public class ByteArrayHashMap
extends 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.ValuesIterator
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
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 and Description |
---|
ByteArrayHashMap(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).
|
Modifier and Type | Method and Description |
---|---|
boolean |
equalsByteArray(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, or
null if this is not the case. |
List<byte[]> |
getKeys() |
protected int |
hash(Object key) |
protected boolean |
isEqualKey(Object key1,
Object key2) |
protected boolean |
isEqualValue(Object value1,
Object value2) |
void |
put(byte[] key,
byte[] value) |
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, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public ByteArrayHashMap(int initialCapacity, float loadFactor, RowMetaInterface keyMeta)
initialCapacity
- the initial capacityloadFactor
- the load factorIllegalArgumentException
- if the initial capacity is negative or the load factor is nonpositivepublic ByteArrayHashMap(int initialCapacity, RowMetaInterface keyMeta)
initialCapacity
- the initial capacity.IllegalArgumentException
- if the initial capacity is negative.public ByteArrayHashMap(RowMetaInterface keyMeta)
protected boolean isEqualKey(Object key1, Object key2)
isEqualKey
in class org.apache.commons.collections.map.AbstractHashedMap
protected boolean isEqualValue(Object value1, Object value2)
isEqualValue
in class org.apache.commons.collections.map.AbstractHashedMap
public final boolean equalsByteArray(byte[] value, byte[] cmpValue)
public byte[] get(byte[] key)
null
if this is not the case.
More formally, if this index contains an entry e
such that key.equals(e))
, then this method returns
e
; otherwise it returns null
. (There can be at most one such entry.)
key
- The key to look up.KettleValueException
- in case of a value conversion error#put(Object)
,
#insert(Object)
public void put(byte[] key, byte[] value)
protected int hash(Object key)
hash
in class org.apache.commons.collections.map.AbstractHashedMap
public List<byte[]> getKeys()
Copyright © 2018 Hitachi Vantara. All rights reserved.