Package org.pentaho.di.core.hash
Class ByteArrayHashMap
java.lang.Object
java.util.AbstractMap
org.apache.commons.collections.map.AbstractHashedMap
org.pentaho.di.core.hash.ByteArrayHashMap
- All Implemented Interfaces:
Map,org.apache.commons.collections.IterableMap
public class ByteArrayHashMap
extends org.apache.commons.collections.map.AbstractHashedMap
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.collections.map.AbstractHashedMap
org.apache.commons.collections.map.AbstractHashedMap.EntrySet, org.apache.commons.collections.map.AbstractHashedMap.EntrySetIterator, org.apache.commons.collections.map.AbstractHashedMap.HashEntry, org.apache.commons.collections.map.AbstractHashedMap.HashIterator, org.apache.commons.collections.map.AbstractHashedMap.HashMapIterator, org.apache.commons.collections.map.AbstractHashedMap.KeySet, org.apache.commons.collections.map.AbstractHashedMap.KeySetIterator, org.apache.commons.collections.map.AbstractHashedMap.Values, org.apache.commons.collections.map.AbstractHashedMap.ValuesIteratorNested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields inherited from class org.apache.commons.collections.map.AbstractHashedMap
data, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_THRESHOLD, entrySet, GETKEY_INVALID, GETVALUE_INVALID, keySet, loadFactor, MAXIMUM_CAPACITY, modCount, NO_NEXT_ENTRY, NO_PREVIOUS_ENTRY, NULL, REMOVE_INVALID, SETVALUE_INVALID, size, threshold, values -
Constructor Summary
ConstructorsConstructorDescriptionByteArrayHashMap(int initialCapacity, float loadFactor, RowMetaInterface keyMeta) Constructs an empty ByteArrayHashMap with the specified initial capacity and load factor.ByteArrayHashMap(int initialCapacity, RowMetaInterface keyMeta) Constructs an empty ByteArrayHashMap with the specified initial capacity and the default load factor (0.75).ByteArrayHashMap(RowMetaInterface keyMeta) Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75). -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanequalsByteArray(byte[] value, byte[] cmpValue) byte[]get(byte[] key) Returns the entry to which the specified key is "mapped", or, in other words, if this index contains an entry that is equal to the given key, ornullif this is not the case.List<byte[]>getKeys()protected intprotected booleanisEqualKey(Object key1, Object key2) protected booleanisEqualValue(Object value1, Object value2) voidput(byte[] key, byte[] value) Methods inherited from class org.apache.commons.collections.map.AbstractHashedMap
addEntry, addMapping, calculateNewCapacity, calculateThreshold, checkCapacity, clear, clone, containsKey, containsValue, convertKey, createEntry, createEntrySetIterator, createKeySetIterator, createValuesIterator, destroyEntry, doReadObject, doWriteObject, ensureCapacity, entryHashCode, entryKey, entryNext, entrySet, entryValue, equals, get, getEntry, hashCode, hashIndex, init, isEmpty, keySet, mapIterator, put, putAll, remove, removeEntry, removeMapping, reuseEntry, size, toString, updateEntry, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ByteArrayHashMap
Constructs an empty ByteArrayHashMap with the specified initial capacity and load factor.- Parameters:
initialCapacity- the initial capacityloadFactor- the load factor- Throws:
IllegalArgumentException- if the initial capacity is negative or the load factor is nonpositive
-
ByteArrayHashMap
Constructs an empty ByteArrayHashMap with the specified initial capacity and the default load factor (0.75).- Parameters:
initialCapacity- the initial capacity.- Throws:
IllegalArgumentException- if the initial capacity is negative.
-
ByteArrayHashMap
Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75).
-
-
Method Details
-
isEqualKey
- Overrides:
isEqualKeyin classorg.apache.commons.collections.map.AbstractHashedMap
-
isEqualValue
- Overrides:
isEqualValuein classorg.apache.commons.collections.map.AbstractHashedMap
-
equalsByteArray
public final boolean equalsByteArray(byte[] value, byte[] cmpValue) -
get
public byte[] get(byte[] key) Returns the entry to which the specified key is "mapped", or, in other words, if this index contains an entry that is equal to the given key, ornullif this is not the case.More formally, if this index contains an entry
esuch thatkey.equals(e)), then this method returnse; otherwise it returnsnull. (There can be at most one such entry.)- Parameters:
key- The key to look up.- Throws:
KettleValueException- in case of a value conversion error- See Also:
-
#put(Object)#insert(Object)
-
put
public void put(byte[] key, byte[] value) -
hash
- Overrides:
hashin classorg.apache.commons.collections.map.AbstractHashedMap
-
getKeys
-