Package net.fauxpark.stringes
Class Util
- java.lang.Object
-
- net.fauxpark.stringes.Util
-
public class Util extends Object
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
Modifier and Type Method Description static boolean
contains(char[] array, char key)
Determines whether the specified array contains the specified character.static boolean
contains(String[] array, String key)
Determines whether the specified array contains the specified string.static int
getMatchCount(String parent, String sub)
Counts the number of times a substring occurs in a parent string.static int
hashOf(Object... objects)
Calculates a hash code from the specified objects.
-
-
-
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.
-
-