Tabnine Logo
Byte2ObjectOpenHashMap.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
it.unimi.dsi.fastutil.bytes.Byte2ObjectOpenHashMap
constructor

Best Java code snippets using it.unimi.dsi.fastutil.bytes.Byte2ObjectOpenHashMap.<init> (Showing top 6 results out of 315)

origin: GoMint/GoMint

/**
 * Constructs a new, empty metadata container which may pre-allocate
 * enough internal capacities to hold at least capacity entries.
 *
 * @param capacity The capacity to pre-allocate
 */
public MetadataContainer( int capacity ) {
  this.entries = new Byte2ObjectOpenHashMap<>( ( capacity > 32 ? 32 : capacity ) );
}
origin: org.gephi/graphstore

  return new Short2ObjectOpenHashMap(map);
} else if (oCls.equals(Byte.class)) {
  return new Byte2ObjectOpenHashMap(map);
} else if (oCls.equals(Long.class)) {
  return new Long2ObjectOpenHashMap(map);
origin: gephi/graphstore

  return new Short2ObjectOpenHashMap(map);
} else if (oCls.equals(Byte.class)) {
  return new Byte2ObjectOpenHashMap(map);
} else if (oCls.equals(Long.class)) {
  return new Long2ObjectOpenHashMap(map);
origin: org.gephi/graphstore

private Map deserializeMap(final DataInput is) throws IOException, ClassNotFoundException {
  Object h = deserialize(is);
  Class oCls = h.getClass();
  if (oCls.equals(Integer.class)) {
    int size = (Integer) h;
    Object2ObjectOpenHashMap set = new Object2ObjectOpenHashMap(size);
    for (int i = 0; i < size; i++) {
      set.put(deserialize(is), deserialize(is));
    }
    return set;
  } else if (oCls.equals(int[].class)) {
    return new Int2ObjectOpenHashMap((int[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(float[].class)) {
    return new Float2ObjectOpenHashMap((float[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(double[].class)) {
    return new Double2ObjectOpenHashMap((double[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(short[].class)) {
    return new Short2ObjectOpenHashMap((short[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(byte[].class)) {
    return new Byte2ObjectOpenHashMap((byte[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(long[].class)) {
    return new Long2ObjectOpenHashMap((long[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(char[].class)) {
    return new Char2ObjectOpenHashMap((char[]) h, (Object[]) deserialize(is));
  }
  throw new EOFException();
}
origin: gephi/graphstore

private Map deserializeMap(final DataInput is) throws IOException, ClassNotFoundException {
  Object h = deserialize(is);
  Class oCls = h.getClass();
  if (oCls.equals(Integer.class)) {
    int size = (Integer) h;
    Object2ObjectOpenHashMap set = new Object2ObjectOpenHashMap(size);
    for (int i = 0; i < size; i++) {
      set.put(deserialize(is), deserialize(is));
    }
    return set;
  } else if (oCls.equals(int[].class)) {
    return new Int2ObjectOpenHashMap((int[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(float[].class)) {
    return new Float2ObjectOpenHashMap((float[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(double[].class)) {
    return new Double2ObjectOpenHashMap((double[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(short[].class)) {
    return new Short2ObjectOpenHashMap((short[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(byte[].class)) {
    return new Byte2ObjectOpenHashMap((byte[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(long[].class)) {
    return new Long2ObjectOpenHashMap((long[]) h, (Object[]) deserialize(is));
  } else if (oCls.equals(char[].class)) {
    return new Char2ObjectOpenHashMap((char[]) h, (Object[]) deserialize(is));
  }
  throw new EOFException();
}
origin: GoMint/GoMint

this.windowIds = new Byte2ObjectOpenHashMap<>();
this.containerIds = new Object2ByteOpenHashMap<>();
this.connection.getServer().getCreativeInventory().addViewer(this);
it.unimi.dsi.fastutil.bytesByte2ObjectOpenHashMap<init>

Javadoc

Creates a new hash map with initial expected Hash#DEFAULT_INITIAL_SIZE entries and Hash#DEFAULT_LOAD_FACTOR as load factor.

Popular methods of Byte2ObjectOpenHashMap

  • put
  • clear
  • containsValue
  • ensureCapacity
  • find
  • get
  • insert
  • keySet
  • putAll
  • realSize
  • rehash
    Rehashes the map. This method implements the basic rehashing strategy, and may be overridden by subc
  • removeEntry
  • rehash,
  • removeEntry,
  • removeNullEntry,
  • shiftKeys,
  • size,
  • tryCapacity

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Runner (org.openjdk.jmh.runner)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now