Klasse HashTableUtil

java.lang.Object
org.deidentifier.arx.framework.check.groupify.HashTableUtil

public class HashTableUtil extends Object
This class implements several helper methods for hash tables.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static final int
    Calculates a new capacity.
    static final int
    calculateThreshold(int buckets, float loadFactor)
    Computes the threshold for rehashing.
    static final boolean
    equals(int[] a, int[] a2)
    Equality check for integer arrays.
    static final int
    hashcode(int[] array)
    Computes a hashcode for an integer array, partially unrolled.
    static final int
    hashcode_old(int[] array)
    Computes a hashcode for an integer array.
    static final void
    Returns the same result as Arrays.fill(array, null)

    Von Klasse geerbte Methoden java.lang.Object

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

    • HashTableUtil

      public HashTableUtil()
  • Methodendetails

    • calculateCapacity

      public static final int calculateCapacity(int x)
      Calculates a new capacity.
      Parameter:
      x - the parameter
      Gibt zurück:
      the capacity
    • calculateThreshold

      public static final int calculateThreshold(int buckets, float loadFactor)
      Computes the threshold for rehashing.
      Parameter:
      buckets -
      loadFactor -
      Gibt zurück:
    • equals

      public static final boolean equals(int[] a, int[] a2)
      Equality check for integer arrays.
      Parameter:
      a - an array
      a2 - another array
      Gibt zurück:
      true, if equal
    • hashcode

      public static final int hashcode(int[] array)
      Computes a hashcode for an integer array, partially unrolled.
      Parameter:
      array -
      Gibt zurück:
      the hashcode
    • hashcode_old

      public static final int hashcode_old(int[] array)
      Computes a hashcode for an integer array.
      Parameter:
      array - the array
      Gibt zurück:
      the hashcode
    • nullifyArray

      public static final void nullifyArray(Object[] array)
      Returns the same result as Arrays.fill(array, null)
      Parameter:
      array - the array