Package org.pepstock.charba.client.utils
Class Hasher
- java.lang.Object
-
- org.pepstock.charba.client.utils.Hasher
-
public final class Hasher extends Object
Internal utility to calculate the hash of java script resources content.
Pay attention, you must use the chars and NOT the bytes because a byte variable can hold any value from -128 to 127 but a char variable can hold any value between 0 and 255.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static inthash(char... values)Returns the hash of a chars array argument.static inthash(String... values)Returns the hash of a strings array argument.static inthash(StringBuilder value)Returns the hash of aStringBuilderargument.
-
-
-
Method Detail
-
hash
public static int hash(StringBuilder value)
Returns the hash of aStringBuilderargument.- Parameters:
value- string builder to use to get the hash- Returns:
- the hash of a
StringBuilder
-
hash
public static int hash(String... values)
Returns the hash of a strings array argument.- Parameters:
values- strings array to use to get the hash- Returns:
- the hash of a strings array
-
hash
public static int hash(char... values)
Returns the hash of a chars array argument.- Parameters:
values- chars array to use to get the hash- Returns:
- the hash of a chars array
-
-