Trie functionality and
utility methods for actual bitwise Trie implementations.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv abstract static class |
| Modifier and Type | Field and Description |
|---|---|
| private final KeyAnalyzer | keyAnalyzer
The |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | AbstractBitwiseTrie(final KeyAnalyzer<? super K>
the keyAnalyzer)KeyAnalyzer to useConstructs a new |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final int | bitIndex(final K key, final K foundKey)
Utility method for calling |
| pack-priv final int | |
| pack-priv final K | |
| pack-priv static boolean | |
| pack-priv final boolean | compareKeys(final K key, final K other)
An utility method for calling |
| protected KeyAnalyzer | |
| pack-priv final boolean | isBitSet(final K key, final int bitIndex, final int lengthInBits)
Returns whether or not the given bit on the key is set or false if the key is null. |
| pack-priv final int | |
| public String |
| keyAnalyzer | back to summary |
|---|---|
| private final KeyAnalyzer<? super K> keyAnalyzer The | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AbstractBitwiseTrie | back to summary |
|---|---|
| protected AbstractBitwiseTrie(final KeyAnalyzer<? super K> keyAnalyzer) Constructs a new
| |
| bitIndex | back to summary |
|---|---|
| pack-priv final int bitIndex(final K key, final K foundKey) Utility method for calling | |
| bitsPerElement | back to summary |
|---|---|
| pack-priv final int bitsPerElement() Returns the number of bits per element in the key
| |
| castKey | back to summary |
|---|---|
| pack-priv final K castKey(final Object key) A utility method to cast keys. It actually doesn't cast anything. It's just fooling the compiler!
| |
| compare | back to summary |
|---|---|
| pack-priv static boolean compare(final Object a, final Object b) Returns true if both values are either null or equal. | |
| compareKeys | back to summary |
|---|---|
| pack-priv final boolean compareKeys(final K key, final K other) An utility method for calling | |
| getKeyAnalyzer | back to summary |
|---|---|
| protected KeyAnalyzer Returns the
| |
| isBitSet | back to summary |
|---|---|
| pack-priv final boolean isBitSet(final K key, final int bitIndex, final int lengthInBits) Returns whether or not the given bit on the key is set or false if the key is null. | |
| lengthInBits | back to summary |
|---|---|
| pack-priv final int lengthInBits(final K key) Returns the length of the given key in bits
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of this map. The string representation
consists of a list of key-value mappings in the order returned by the
map's | |
Entry.
| Modifier and Type | Field and Description |
|---|---|
| protected K | |
| private static final long | |
| protected V |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(final Object
object to be compared for equality with this map entry o)Overrides java. Implements java. |
| public K | |
| public V | |
| public int | hashCode()
Overrides java. Implements java. |
| public V | setKeyValue(final K key, final V value)
Replaces the current key and value with the provided key & value. |
| public V | setValue(final V
new value to be stored in this entry value)Implements java. |
| public String |
| key | back to summary |
|---|---|
| protected K key | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| value | back to summary |
|---|---|
| protected V value | |
| BasicEntry | back to summary |
|---|---|
| public BasicEntry(final K key) | |
| BasicEntry | back to summary |
|---|---|
| public BasicEntry(final K key, final V value) | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Implements java. Doc from java. Compares the specified object with this entry for equality.
Returns
(e1.getKey()==null ?
e2.getKey()==null : e1.getKey().equals(e2.getKey())) &&
(e1.getValue()==null ?
e2.getValue()==null : e1.getValue().equals(e2.getValue()))
This ensures that the equals method works properly across
different implementations of the Map.Entry interface.
| |
| getKey | back to summary |
|---|---|
| public K getKey() Implements java. Doc from java. Returns the key corresponding to this entry.
| |
| getValue | back to summary |
|---|---|
| public V getValue() Implements java. Doc from java. Returns the value corresponding to this entry. If the mapping
has been removed from the backing map (by the iterator's
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code value for this map entry. The hash code
of a map entry
(e.getKey()==null ? 0 : e.getKey().hashCode()) ^
(e.getValue()==null ? 0 : e.getValue().hashCode())
This ensures that e1.equals(e2) implies that
e1.hashCode()==e2.hashCode() for any two Entries
e1 and e2, as required by the general
contract of Object.hashCode.
| |
| setKeyValue | back to summary |
|---|---|
| public V setKeyValue(final K key, final V value) Replaces the current key and value with the provided key & value. | |
| setValue | back to summary |
|---|---|
| public V setValue(final V value) Implements java. Doc from java. Replaces the value corresponding to this entry with the specified
value (optional operation). (Writes through to the map.) The
behavior of this call is undefined if the mapping has already been
removed from the map (by the iterator's
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |