Class Hashes

java.lang.Object
pascal.taie.util.Hashes

public final class Hashes extends Object
Static utility methods for computing hash code. Avoids array creation of Objects.hash().
  • Method Details

    • hash

      public static int hash(Object o1, Object o2)
      Returns:
      hash code of two objects.
      Throws:
      NullPointerException - if any parameter is null
    • safeHash

      public static int safeHash(Object o1, Object o2)
      Returns:
      hash code of two objects, with null check.
    • hash

      public static int hash(Object o1, Object o2, Object o3)
      Returns:
      hash code of three objects.
      Throws:
      NullPointerException - if any parameter is null
    • safeHash

      public static int safeHash(Object o1, Object o2, Object o3)
      Returns:
      hash code of four objects, with null check.
    • hash

      public static int hash(Object o1, Object o2, Object o3, Object o4)
      Returns:
      hash code of four objects.
      Throws:
      NullPointerException - if any parameter is null
    • safeHash

      public static int safeHash(Object o1, Object o2, Object o3, Object o4)
      Returns:
      hash code of four objects, with null check.