Class AbstractHashFunction<K>

java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<K>
it.unimi.dsi.sux4j.mph.AbstractHashFunction<K>
All Implemented Interfaces:
it.unimi.dsi.fastutil.Function<K,Long>, it.unimi.dsi.fastutil.objects.Object2LongFunction<K>, it.unimi.dsi.fastutil.Size64, Serializable, Function<K,Long>, ToLongFunction<K>
Direct Known Subclasses:
CHDMinimalPerfectHashFunction, GOVMinimalPerfectHashFunction, GOVMinimalPerfectHashFunction128, HollowTrieDistributorMonotoneMinimalPerfectHashFunction, HollowTrieMonotoneMinimalPerfectHashFunction, LcpMonotoneMinimalPerfectHashFunction, MinimalPerfectHashFunction, PaCoTrieDistributorMonotoneMinimalPerfectHashFunction, TwoStepsGOV3Function, TwoStepsLcpMonotoneMinimalPerfectHashFunction, TwoStepsMWHCFunction, VLLcpMonotoneMinimalPerfectHashFunction, VLPaCoTrieDistributorMonotoneMinimalPerfectHashFunction, ZFastTrieDistributorMonotoneMinimalPerfectHashFunction

public abstract class AbstractHashFunction<K> extends it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction<K> implements it.unimi.dsi.fastutil.Size64
A very minimal abstract hash implementation. It extends AbstractObject2LongFunction, by Size64. Moreover, it provides a deprecated size() method that returns -1 if size64() is -1 or greater than Integer.MAX_VALUE, a size64() returning -1 (that you are invited to override), and a containsKey(Object) implementation that returns true.
See Also:
  • Field Summary

    Fields inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction

    defRetValue
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Deprecated.
    long
     

    Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2LongFunction

    defaultReturnValue, defaultReturnValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface it.unimi.dsi.fastutil.Function

    apply, clear

    Methods inherited from interface java.util.function.Function

    compose

    Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2LongFunction

    andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsLong, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, get, getLong, getOrDefault, getOrDefault, put, put, remove, removeLong
  • Constructor Details

    • AbstractHashFunction

      public AbstractHashFunction()
  • Method Details

    • containsKey

      public boolean containsKey(Object key)
      Specified by:
      containsKey in interface it.unimi.dsi.fastutil.Function<K,Long>
    • size

      @Deprecated public int size()
      Deprecated.
      Specified by:
      size in interface it.unimi.dsi.fastutil.Function<K,Long>
      Specified by:
      size in interface it.unimi.dsi.fastutil.Size64
    • size64

      public long size64()
      Specified by:
      size64 in interface it.unimi.dsi.fastutil.Size64