Package | Description |
---|---|
squidpony |
Utilities that don't fit elsewhere in SquidLib; mostly text manipulation, compression, and helper code.
|
squidpony.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
Modifier and Type | Class and Description |
---|---|
protected class |
IColorCenter.Skeleton.GranularHasher |
Modifier and Type | Field and Description |
---|---|
static CrossHash.IHasher |
StringConvert.spaceIgnoringArrayHasher |
static CrossHash.IHasher |
StringConvert.spaceIgnoringHasher |
Modifier and Type | Class and Description |
---|---|
static class |
HashCommon.EnumHasher |
Modifier and Type | Field and Description |
---|---|
static CrossHash.IHasher |
CrossHash.booleanHasher |
static CrossHash.IHasher |
CrossHash.byteHasher |
static CrossHash.IHasher |
Hashers.caseInsensitiveStringHasher
Hashes and equality-checks CharSequences, such as Strings and StringBuilders, using case-insensitive comparison
in a cross-platform way.
|
static CrossHash.IHasher |
CrossHash.char2DHasher |
static CrossHash.IHasher |
CrossHash.charHasher |
static CrossHash.IHasher |
CrossHash.defaultHasher |
static CrossHash.IHasher |
CrossHash.doubleHasher |
static CrossHash.IHasher |
CrossHash.floatHasher |
static CrossHash.IHasher |
CrossHash.generalHasher
This IHasher is the one you should use if you aren't totally certain what types will go in an OrderedMap's keys
or an OrderedSet's items, since it can handle mixes of elements.
|
protected CrossHash.IHasher |
Arrangement.hasher |
protected CrossHash.IHasher |
OrderedMap.hasher |
protected CrossHash.IHasher |
OrderedSet.hasher |
protected CrossHash.IHasher |
UnorderedMap.hasher |
protected CrossHash.IHasher |
UnorderedSet.hasher |
static CrossHash.IHasher |
Hashers.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 |
CrossHash.identityHasher |
static CrossHash.IHasher |
CrossHash.int2DHasher |
static CrossHash.IHasher |
CrossHash.intHasher |
static CrossHash.IHasher |
Hashers.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 |
CrossHash.long2DHasher |
static CrossHash.IHasher |
CrossHash.longHasher |
static CrossHash.IHasher |
CrossHash.mildHasher
The most basic IHasher type; effectively delegates to
Objects.hashCode(Object) and
Objects.equals(Object, Object) . |
static CrossHash.IHasher |
Hashers.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 |
Hashers.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 |
Hashers.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.
|
static CrossHash.IHasher |
CrossHash.objectArrayHasher |
static CrossHash.IHasher |
CrossHash.shortHasher |
static CrossHash.IHasher |
CrossHash.stringArrayHasher
Though the name suggests this only hashes String arrays, it can actually hash any CharSequence array as well.
|
static CrossHash.IHasher |
CrossHash.stringHasher |
Modifier and Type | Method and Description |
---|---|
static boolean |
CrossHash.equalityHelper(java.lang.Object[] left,
java.lang.Object[] right,
CrossHash.IHasher inner)
Not a general-purpose method; meant to ease implementation of
areEqual(Object, Object)
methods when the type being compared is a multi-dimensional array (which normally requires the heavyweight method
Arrays.deepEquals(Object[], Object[]) or doing more work yourself; this reduces the work needed to
implement fixed-depth equality). |
Constructor and Description |
---|
Arrangement(CrossHash.IHasher hasher)
Creates a new Arrangement with initial expected 16 entries and 0.5f as load factor.
|
Arrangement(int expected,
CrossHash.IHasher hasher)
Creates a new Arrangement with 0.5f as load factor.
|
Arrangement(int expected,
float f,
CrossHash.IHasher hasher)
Creates a new Arrangement.
|
Arrangement(K[] keyArray,
CrossHash.IHasher hasher)
Creates a new Arrangement with 0.5f as load factor using the elements of two parallel arrays.
|
Arrangement(K[] keyArray,
float f,
CrossHash.IHasher hasher)
Creates a new Arrangement using the elements of two parallel arrays.
|
Arrangement(java.util.Map<? extends K,? extends java.lang.Integer> m,
CrossHash.IHasher hasher)
Creates a new Arrangement with 0.5f as load factor copying a given one.
|
Arrangement(java.util.Map<? extends K,? extends java.lang.Integer> m,
float f,
CrossHash.IHasher hasher)
Creates a new Arrangement copying a given one.
|
K2(int expected,
float f,
CrossHash.IHasher hasherA,
CrossHash.IHasher hasherB)
Constructs a K2 with the expected number of indices to hold (the number of A and number of B items are always
equal, and this will be more efficient if expected is greater than that number), the load factor to use,
between 0.1f and 0.8f usually (using load factors higher than 0.8f can cause problems), and two IHasher
implementations, such as
CrossHash.generalHasher , that will be used to hash and compare for equality with
A keys and B keys, respectively. |
OrderedMap(CrossHash.IHasher hasher)
Creates a new OrderedMap with initial expected 16 entries and 0.75f as load factor.
|
OrderedMap(int expected,
CrossHash.IHasher hasher)
Creates a new OrderedMap with 0.75f as load factor.
|
OrderedMap(int expected,
float f,
CrossHash.IHasher hasher)
Creates a new OrderedMap.
|
OrderedMap(K[] keyArray,
V[] valueArray,
CrossHash.IHasher hasher)
Creates a new OrderedMap with 0.75f as load factor using the elements of two parallel arrays.
|
OrderedMap(K[] keyArray,
V[] valueArray,
float f,
CrossHash.IHasher hasher)
Creates a new OrderedMap using the elements of two parallel arrays.
|
OrderedMap(java.util.Map<? extends K,? extends V> m,
CrossHash.IHasher hasher)
Creates a new OrderedMap with 0.75f as load factor copying a given one.
|
OrderedMap(java.util.Map<? extends K,? extends V> m,
float f,
CrossHash.IHasher hasher)
Creates a new OrderedMap copying a given one.
|
OrderedSet(java.util.Collection<? extends K> c,
CrossHash.IHasher hasher)
Creates a new hash set with
OrderedSet.DEFAULT_LOAD_FACTOR as load
factor copying a given collection. |
OrderedSet(java.util.Collection<? extends K> c,
float f,
CrossHash.IHasher hasher)
Creates a new hash set copying a given collection.
|
OrderedSet(CrossHash.IHasher hasher)
Creates a new hash set with
OrderedSet.DEFAULT_LOAD_FACTOR as load
factor. |
OrderedSet(int expected,
CrossHash.IHasher hasher)
Creates a new hash set with
OrderedSet.DEFAULT_LOAD_FACTOR as load
factor. |
OrderedSet(int expected,
float f,
CrossHash.IHasher hasher)
Creates a new hash map.
|
OrderedSet(K[] a,
CrossHash.IHasher hasher)
Creates a new hash set with
OrderedSet.DEFAULT_LOAD_FACTOR as load
factor copying the elements of an array. |
OrderedSet(K[] a,
float f,
CrossHash.IHasher hasher)
Creates a new hash set copying the elements of an array.
|
OrderedSet(K[] a,
int offset,
int length,
CrossHash.IHasher hasher)
Creates a new hash set with
OrderedSet.DEFAULT_LOAD_FACTOR as load
factor and fills it with the elements of a given array. |
OrderedSet(K[] a,
int offset,
int length,
float f,
CrossHash.IHasher hasher)
Creates a new hash set and fills it with the elements of a given array.
|
UnorderedMap(CrossHash.IHasher hasher)
Creates a new OrderedMap with initial expected 16 entries and 0.75f as load factor.
|
UnorderedMap(int expected,
CrossHash.IHasher hasher)
Creates a new OrderedMap with 0.75f as load factor.
|
UnorderedMap(int expected,
float f,
CrossHash.IHasher hasher)
Creates a new OrderedMap.
|
UnorderedMap(K[] keyArray,
V[] valueArray,
CrossHash.IHasher hasher)
Creates a new OrderedMap with 0.75f as load factor using the elements of two parallel arrays.
|
UnorderedMap(K[] keyArray,
V[] valueArray,
float f,
CrossHash.IHasher hasher)
Creates a new OrderedMap using the elements of two parallel arrays.
|
UnorderedMap(java.util.Map<? extends K,? extends V> m,
CrossHash.IHasher hasher)
Creates a new OrderedMap with 0.75f as load factor copying a given one.
|
UnorderedMap(java.util.Map<? extends K,? extends V> m,
float f,
CrossHash.IHasher hasher)
Creates a new OrderedMap copying a given one.
|
UnorderedSet(java.util.Collection<? extends K> c,
CrossHash.IHasher hasher)
Creates a new hash set with
UnorderedSet.DEFAULT_LOAD_FACTOR as load
factor copying a given collection. |
UnorderedSet(java.util.Collection<? extends K> c,
float f,
CrossHash.IHasher hasher)
Creates a new hash set copying a given collection.
|
UnorderedSet(CrossHash.IHasher hasher)
Creates a new hash set with
UnorderedSet.DEFAULT_LOAD_FACTOR as load
factor. |
UnorderedSet(int expected,
CrossHash.IHasher hasher)
Creates a new hash set with
UnorderedSet.DEFAULT_LOAD_FACTOR as load
factor. |
UnorderedSet(int expected,
float f,
CrossHash.IHasher hasher)
Creates a new hash map.
|
UnorderedSet(K[] a,
CrossHash.IHasher hasher)
Creates a new hash set with
UnorderedSet.DEFAULT_LOAD_FACTOR as load
factor copying the elements of an array. |
UnorderedSet(K[] a,
float f,
CrossHash.IHasher hasher)
Creates a new hash set copying the elements of an array.
|
UnorderedSet(K[] a,
int offset,
int length,
CrossHash.IHasher hasher)
Creates a new hash set with
UnorderedSet.DEFAULT_LOAD_FACTOR as load
factor and fills it with the elements of a given array. |
UnorderedSet(K[] a,
int offset,
int length,
float f,
CrossHash.IHasher hasher)
Creates a new hash set and fills it with the elements of a given array.
|
Copyright © Eben Howard 2012–2022. All rights reserved.