Class Util


  • public final class Util
    extends java.lang.Object
    This class collects various static helper methods.

    For helper methods related to special application fields see other utilities classes.

    Since:
    0.1
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long HASHPRIME
      Prime number used in hash code computation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Util()
      Fake constructor: do not instantiate.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int mixHashCodes​(int... hash)
      Mix multiple hashcodes into one.
      static int mixHashCodes​(int hash1, int hash2)
      Mix multiple hashcodes into one.
      static int mixHashCodes​(int hash1, int hash2, int hash3)
      Mix multiple hashcodes into one.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HASHPRIME

        private static final long HASHPRIME
        Prime number used in hash code computation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Util

        private Util()
        Fake constructor: do not instantiate.
    • Method Detail

      • mixHashCodes

        public static int mixHashCodes​(int hash1,
                                       int hash2)
        Mix multiple hashcodes into one.
        Parameters:
        hash1 - First hashcode to mix
        hash2 - Second hashcode to mix
        Returns:
        Mixed hash code
      • mixHashCodes

        public static int mixHashCodes​(int hash1,
                                       int hash2,
                                       int hash3)
        Mix multiple hashcodes into one.
        Parameters:
        hash1 - First hashcode to mix
        hash2 - Second hashcode to mix
        hash3 - Third hashcode to mix
        Returns:
        Mixed hash code
      • mixHashCodes

        public static int mixHashCodes​(int... hash)
        Mix multiple hashcodes into one.
        Parameters:
        hash - Hashcodes to mix
        Returns:
        Mixed hash code