Class Util


  • public class Util
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Util()  
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • hashOf

        public static int hashOf​(Object... objects)
        Calculates a hash code from the specified objects.
        Parameters:
        objects - The objects to hash.
        Returns:
        The hash code of the given objects.
      • getMatchCount

        public static int getMatchCount​(String parent,
                                        String sub)
        Counts the number of times a substring occurs in a parent string.
        Parameters:
        parent - The parent string to search.
        sub - The substring to look for.
        Returns:
        The number of occurrences of the given substring in the given parent string.
      • contains

        public static boolean contains​(char[] array,
                                       char key)
        Determines whether the specified array contains the specified character.
        Parameters:
        array - The array to search.
        key - The character to look for.
        Returns:
        True if the given character is present in the given character array.
      • contains

        public static boolean contains​(String[] array,
                                       String key)
        Determines whether the specified array contains the specified string.
        Parameters:
        array - The array to search.
        key - The string to look for.
        Returns:
        True if the given string is present in the given string array.