Codota Logo
Int2ObjectSortedMap
Code IndexAdd Codota to your IDE (free)

How to use
Int2ObjectSortedMap
in
it.unimi.dsi.fastutil.ints

Best Java code snippets using it.unimi.dsi.fastutil.ints.Int2ObjectSortedMap (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: jtablesaw/tablesaw

public Selection lessThan(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> head = index.headMap(value);  // we add 1 to get values equal to the arg
  for (IntArrayList keys : head.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
origin: Mojang/DataFixerUpper

protected static int getLowestSchemaSameVersion(final Int2ObjectSortedMap<Schema> schemas, final int versionKey) {
  if (versionKey < schemas.firstIntKey()) {
    // can't have a data type before anything else
    return schemas.firstIntKey();
  }
  return schemas.subMap(0, versionKey + 1).lastIntKey();
}
origin: Mojang/DataFixerUpper

public Schema addSchema(final int version, final int subVersion, final BiFunction<Integer, Schema, Schema> factory) {
  final int key = DataFixUtils.makeKey(version, subVersion);
  final Schema parent = schemas.isEmpty() ? null : schemas.get(DataFixerUpper.getLowestSchemaSameVersion(schemas, key - 1));
  final Schema schema = factory.apply(DataFixUtils.makeKey(version, subVersion), parent);
  addSchema(schema);
  return schema;
}
origin: it.unimi.dsi/fastutil

/**
 * {@inheritDoc}
 * <p>
 * Note that this specification strengthens the one given in
 * {@link SortedMap#subMap(Object,Object)}.
 * 
 * @deprecated Please use the corresponding type-specific method instead.
 */
@Deprecated
@Override
default Int2ObjectSortedMap<V> subMap(final Integer from, final Integer to) {
  return subMap((from).intValue(), (to).intValue());
}
/**
origin: it.unimi.dsi/fastutil

@Override
public int firstIntKey() {
  synchronized (sync) {
    return sortedMap.firstIntKey();
  }
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public int lastIntKey() {
  synchronized (sync) {
    return sortedMap.lastIntKey();
  }
}
/**
origin: it.unimi.dsi/fastutil

/**
 * {@inheritDoc}
 * <p>
 * Note that this specification strengthens the one given in
 * {@link SortedMap#headMap(Object)}.
 * 
 * @deprecated Please use the corresponding type-specific method instead.
 */
@Deprecated
@Override
default Int2ObjectSortedMap<V> headMap(final Integer to) {
  return headMap((to).intValue());
}
/**
origin: it.unimi.dsi/fastutil

/**
 * Returns an iterable yielding a bidirectional iterator that will be
 * {@linkplain FastSortedEntrySet fast}, if possible, on the
 * {@linkplain Map#entrySet() entry set} of the provided {@code map}.
 * 
 * @param map
 *            a map from which we will try to extract an iterable yielding a
 *            (fast) bidirectional iterator on the entry set.
 * @return an iterable yielding a bidirectional iterator on the entry set of the
 *         given map that will be fast, if possible.
 * @since 8.0.0
 */
@SuppressWarnings("unchecked")
public static <V> ObjectBidirectionalIterable<Int2ObjectMap.Entry<V>> fastIterable(Int2ObjectSortedMap<V> map) {
  final ObjectSortedSet<Int2ObjectMap.Entry<V>> entries = map.int2ObjectEntrySet();
  return entries instanceof Int2ObjectSortedMap.FastSortedEntrySet
      ? ((Int2ObjectSortedMap.FastSortedEntrySet<V>) entries)::fastIterator
      : entries;
}
/**
origin: it.unimi.dsi/fastutil

@Override
public IntComparator comparator() {
  return sortedMap.comparator();
}
@Override
origin: Mojang/DataFixerUpper

@Override
public Schema getSchema(final int key) {
  return schemas.get(getLowestSchemaSameVersion(schemas, key));
}
origin: it.unimi.dsi/fastutil

/**
 * {@inheritDoc}
 * 
 * @deprecated Please use the corresponding type-specific method instead.
 */
@Deprecated
@Override
public Integer firstKey() {
  return sortedMap.firstKey();
}
/**
origin: it.unimi.dsi/fastutil

/**
 * {@inheritDoc}
 * 
 * @deprecated Please use the corresponding type-specific method instead.
 */
@Deprecated
@Override
public Int2ObjectSortedMap<V> subMap(final Integer from, final Integer to) {
  return new SynchronizedSortedMap<>(sortedMap.subMap(from, to), sync);
}
/**
origin: it.unimi.dsi/fastutil

@Override
public int firstIntKey() {
  return sortedMap.firstIntKey();
}
@Override
origin: it.unimi.dsi/fastutil

@Override
public int lastIntKey() {
  return sortedMap.lastIntKey();
}
/**
origin: it.unimi.dsi/fastutil

/**
 * {@inheritDoc}
 * 
 * @deprecated Please use the corresponding type-specific method instead.
 */
@Deprecated
@Override
public Int2ObjectSortedMap<V> headMap(final Integer to) {
  return new UnmodifiableSortedMap<>(sortedMap.headMap(to));
}
/**
origin: it.unimi.dsi/fastutil

/**
 * Returns a sorted-set view of the mappings contained in this map.
 * <p>
 * Note that this specification strengthens the one given in the corresponding
 * type-specific unsorted map.
 *
 * @return a sorted-set view of the mappings contained in this map.
 * @see SortedMap#entrySet()
 * @deprecated Please use the corresponding type-specific method instead.
 */
@SuppressWarnings({"unchecked", "rawtypes"})
@Deprecated
@Override
default ObjectSortedSet<Map.Entry<Integer, V>> entrySet() {
  return (ObjectSortedSet) int2ObjectEntrySet();
}
/**
origin: it.unimi.dsi/fastutil

@Override
public IntComparator comparator() {
  synchronized (sync) {
    return sortedMap.comparator();
  }
}
@Override
origin: Mojang/DataFixerUpper

  public DataFixer build(final Executor executor) {
    final DataFixerUpper fixerUpper = new DataFixerUpper(new Int2ObjectAVLTreeMap<>(schemas), new ArrayList<>(globalList), new IntAVLTreeSet(fixerVersions));

    final IntBidirectionalIterator iterator = fixerUpper.fixerVersions().iterator();
    while (iterator.hasNext()) {
      final int versionKey = iterator.nextInt();
      final Schema schema = schemas.get(versionKey);
      for (final String typeName : schema.types()) {
        CompletableFuture.runAsync(() -> {
          final Type<?> dataType = schema.getType(() -> typeName);
          final TypeRewriteRule rule = fixerUpper.getRule(DataFixUtils.getVersion(versionKey), dataVersion);
          dataType.rewrite(rule, DataFixerUpper.OPTIMIZATION_RULE);
        }, executor).exceptionally(e -> {
          LOGGER.error("Unable to build datafixers", e);
          Runtime.getRuntime().exit(1);
          return null;
        });
      }
    }

    return fixerUpper;
  }
}
origin: it.unimi.dsi/fastutil

/**
 * {@inheritDoc}
 * 
 * @deprecated Please use the corresponding type-specific method instead.
 */
@Deprecated
@Override
public Integer firstKey() {
  synchronized (sync) {
    return sortedMap.firstKey();
  }
}
/**
origin: jtablesaw/tablesaw

public Selection atMost(int value) {
  Selection selection = new BitmapBackedSelection();
  Int2ObjectSortedMap<IntArrayList> head = index.headMap(value + 1);  // we add 1 to get values equal to the arg
  for (IntArrayList keys : head.values()) {
    addAllToSelection(keys, selection);
  }
  return selection;
}
it.unimi.dsi.fastutil.intsInt2ObjectSortedMap

Javadoc

A type-specific SortedMap; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this interface strengthens #entrySet(), #keySet(), #values(), #comparator(), SortedMap#subMap(Object,Object), SortedMap#headMap(Object)and SortedMap#tailMap(Object).

Most used methods

  • values
  • firstIntKey
    Returns the first (lowest) key currently in this map.
  • lastIntKey
    Returns the last (highest) key currently in this map.
  • subMap
    Note that this specification strengthens the one given in SortedMap#subMap(Object,Object).
  • comparator
  • firstKey
  • get
  • headMap
    Note that this specification strengthens the one given in SortedMap#headMap(Object).
  • int2ObjectEntrySet
  • isEmpty
  • keySet
  • lastKey
  • keySet,
  • lastKey,
  • put,
  • tailMap

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • JTextField (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now