Class TIntIntHashMapSerializer

java.lang.Object
com.esotericsoftware.kryo.Serializer<gnu.trove.map.hash.TIntIntHashMap>
com.conveyal.kryo.TIntIntHashMapSerializer

public class TIntIntHashMapSerializer extends com.esotericsoftware.kryo.Serializer<gnu.trove.map.hash.TIntIntHashMap>
Kryo Serializer for Trove primitive int-int hash maps. Based on the corresponding Externalizable implementation from Trove itself. Using optimizePositive on keys and values, serialized NL R5 networks with linkages are 13% smaller. Writing with this serializer is much faster than using the Kryo Externalizable serializer.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    gnu.trove.map.hash.TIntIntHashMap
    read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class type)
     
    void
    write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, gnu.trove.map.hash.TIntIntHashMap map)
    Based on writeExternal in the hierarchy of TIntIntHashMap.

    Methods inherited from class com.esotericsoftware.kryo.Serializer

    copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TIntIntHashMapSerializer

      public TIntIntHashMapSerializer()
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, gnu.trove.map.hash.TIntIntHashMap map)
      Based on writeExternal in the hierarchy of TIntIntHashMap.
      Specified by:
      write in class com.esotericsoftware.kryo.Serializer<gnu.trove.map.hash.TIntIntHashMap>
    • read

      public gnu.trove.map.hash.TIntIntHashMap read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class type)
      Specified by:
      read in class com.esotericsoftware.kryo.Serializer<gnu.trove.map.hash.TIntIntHashMap>