public abstract class StringHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
GOOD_FAST_HASH_SEED
Pass this as the seed to
murmurhash3_x86_32(byte[], int, int, int). |
| Modifier and Type | Method and Description |
|---|---|
static int |
bytesDifference(BytesRef left,
BytesRef right)
Compares two
BytesRef, element by element, and returns the
number of elements common to both arrays. |
static boolean |
endsWith(BytesRef ref,
BytesRef suffix)
Returns
true iff the ref ends with the given suffix. |
static boolean |
equals(String s1,
String s2) |
static Comparator<String> |
getVersionComparator() |
static int |
murmurhash3_x86_32(byte[] data,
int offset,
int len,
int seed)
Returns the MurmurHash3_x86_32 hash.
|
static int |
murmurhash3_x86_32(BytesRef bytes,
int seed) |
static boolean |
startsWith(BytesRef ref,
BytesRef prefix)
Returns
true iff the ref starts with the given prefix. |
public static final int GOOD_FAST_HASH_SEED
murmurhash3_x86_32(byte[], int, int, int).public static int bytesDifference(BytesRef left, BytesRef right)
BytesRef, element by element, and returns the
number of elements common to both arrays.public static Comparator<String> getVersionComparator()
public static boolean startsWith(BytesRef ref, BytesRef prefix)
true iff the ref starts with the given prefix.
Otherwise false.ref - the BytesRef to testprefix - the expected prefixtrue iff the ref starts with the given prefix.
Otherwise false.public static boolean endsWith(BytesRef ref, BytesRef suffix)
true iff the ref ends with the given suffix. Otherwise
false.ref - the BytesRef to testsuffix - the expected suffixtrue iff the ref ends with the given suffix.
Otherwise false.public static int murmurhash3_x86_32(byte[] data,
int offset,
int len,
int seed)
public static int murmurhash3_x86_32(BytesRef bytes, int seed)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.