public class Hashers
extends java.lang.Object
CrossHash.IHasher
interface for more specialized uses, like for use in an
OrderedSet or OrderedMap with String keys that should use case-insensitive equality/hashing.
Created by Tommy Ettinger on 4/15/2017.Modifier and Type | Field and Description |
---|---|
static CrossHash.IHasher |
caseInsensitiveStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, using case-insensitive comparison
in a cross-platform way.
|
static CrossHash.IHasher |
identifierOnlyStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, but only considers valid chars that
are valid components of Java identifiers (it does not check that the Strings are valid identifiers, but considers
only letters, digits, currency symbols, underscores (and related underscore-like characters), and a few other
types of glyph, ignoring whitespace and most punctuation marks), and works in a cross-platform way.
|
static CrossHash.IHasher |
letterOnlyStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, but only considers letters (that
is, characters that are in the Unicode category "L", including A-Z, a-z, most characters used in most non-English
languages (katakana glyphs from Japanese count as letters, for instance)), and works in a cross-platform way.
|
static CrossHash.IHasher |
noLetterStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, but does not consider letters (that
is, characters that are in the Unicode category "L", including A-Z, a-z, most characters used in most non-English
languages (katakana glyphs from Japanese count as letters, for instance)), and works in a cross-platform way.
|
static CrossHash.IHasher |
noNumberStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, but does not consider any number
glyphs (Unicode category "N", including 0-9, but also various numbers in other languages, such as the dedicated
Roman numeral characters), and works in a cross-platform way.
|
static CrossHash.IHasher |
noSpaceStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, but does not consider whitespace
(including space, newline, carriage return, tab, and so on), and works in a cross-platform way.
|
Constructor and Description |
---|
Hashers() |
public static final CrossHash.IHasher caseInsensitiveStringHasher
public static final CrossHash.IHasher letterOnlyStringHasher
public static final CrossHash.IHasher identifierOnlyStringHasher
public static final CrossHash.IHasher noSpaceStringHasher
public static final CrossHash.IHasher noNumberStringHasher
public static final CrossHash.IHasher noLetterStringHasher
Copyright © Eben Howard 2012–2022. All rights reserved.