Package com.alibaba.druid.util
Class FnvHash
- java.lang.Object
-
- com.alibaba.druid.util.FnvHash
-
public final class FnvHash extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFnvHash.Constants
-
Constructor Summary
Constructors Constructor Description FnvHash()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longfnv_32_lower(String key)static longfnv1a_64(byte[] input, int offset, int end)static longfnv1a_64(char[] chars)static longfnv1a_64(String input)static longfnv1a_64(StringBuilder input)static longfnv1a_64(String input, int offset, int end)static longfnv1a_64_lower(long basic, StringBuilder key)static longfnv1a_64_lower(String key)static long[]fnv1a_64_lower(String[] strings, boolean sort)static longfnv1a_64_lower(StringBuilder key)static longhashCode64(long basic, String name)static longhashCode64(long basic, String key, int offset, int end)static longhashCode64(String name)lower and normalized and fnv_1a_64static longhashCode64(String key, int offset, int end)static longhashCode64(String owner, String name)normalized and lower and fnv1a_64_hash
-
-
-
Field Detail
-
BASIC
public static final long BASIC
- See Also:
- Constant Field Values
-
PRIME
public static final long PRIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
fnv1a_64
public static long fnv1a_64(String input)
-
fnv1a_64
public static long fnv1a_64(StringBuilder input)
-
fnv1a_64
public static long fnv1a_64(String input, int offset, int end)
-
fnv1a_64
public static long fnv1a_64(byte[] input, int offset, int end)
-
fnv1a_64
public static long fnv1a_64(char[] chars)
-
hashCode64
public static long hashCode64(String name)
lower and normalized and fnv_1a_64- Parameters:
name- the string to calculate the hash code for- Returns:
- the 64-bit hash code of the string
-
fnv1a_64_lower
public static long fnv1a_64_lower(String key)
-
fnv1a_64_lower
public static long fnv1a_64_lower(StringBuilder key)
-
fnv1a_64_lower
public static long fnv1a_64_lower(long basic, StringBuilder key)
-
hashCode64
public static long hashCode64(String key, int offset, int end)
-
hashCode64
public static long hashCode64(long basic, String name)
-
hashCode64
public static long hashCode64(long basic, String key, int offset, int end)
-
fnv_32_lower
public static long fnv_32_lower(String key)
-
fnv1a_64_lower
public static long[] fnv1a_64_lower(String[] strings, boolean sort)
-
hashCode64
public static long hashCode64(String owner, String name)
normalized and lower and fnv1a_64_hash- Parameters:
owner- the owner string to include in the hash code calculation (can be null)name- the name string to include in the hash code calculation (can be null)- Returns:
- the 64-bit hash code calculated from the owner and name strings
-
-