Class TCustomObjectHash<T>

    • Constructor Detail

      • TCustomObjectHash

        public TCustomObjectHash()
        FOR EXTERNALIZATION ONLY!!!
      • TCustomObjectHash

        public TCustomObjectHash​(HashingStrategy<? super T> strategy)
        Creates a new TManualObjectHash instance with the default capacity and load factor.
      • TCustomObjectHash

        public TCustomObjectHash​(HashingStrategy<? super T> strategy,
                                 int initialCapacity)
        Creates a new TManualObjectHash instance whose capacity is the next highest prime above initialCapacity + 1 unless that value is already prime.
        Parameters:
        initialCapacity - an int value
      • TCustomObjectHash

        public TCustomObjectHash​(HashingStrategy<? super T> strategy,
                                 int initialCapacity,
                                 float loadFactor)
        Creates a new TManualObjectHash instance with a prime value at or near the specified capacity and load factor.
        Parameters:
        initialCapacity - used to find a prime capacity for the table.
        loadFactor - used to calculate the threshold over which rehashing takes place.
    • Method Detail

      • hash

        protected int hash​(java.lang.Object obj)
        Overrides:
        hash in class TObjectHash<T>
      • equals

        protected boolean equals​(java.lang.Object one,
                                 java.lang.Object two)
        Overrides:
        equals in class TObjectHash<T>
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class TObjectHash<T>
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class TObjectHash<T>
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException