public static final class Basic2ObjectMap.BasicObject2ObjectOpenHashMap<K extends org.apache.hadoop.io.Writable,V> extends Basic2ObjectMap<K,V>
Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V>, Basic2ObjectMap.BasicLong2ObjectOpenHashMap<V>, Basic2ObjectMap.BasicObject2ObjectOpenHashMap<K extends org.apache.hadoop.io.Writable,V>, Basic2ObjectMap.ReusableIterator<Iter extends Iterator<?>>| Constructor and Description |
|---|
BasicObject2ObjectOpenHashMap(int capacity,
WritableWriter<K> keyWriter,
WritableWriter<V> valueWriter)
Constructor
|
BasicObject2ObjectOpenHashMap(WritableWriter<K> keyWriter,
WritableWriter<V> valueWriter)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all of the elements from this list.
|
boolean |
containsKey(K key)
Checks whether key is present in the map
|
Iterator<K> |
fastKeyIterator()
Fast iterator over keys within this map, which doesn't allocate new
element for each returned element.
|
V |
get(K key)
Get value for a given key
|
PrimitiveIdTypeOps<K> |
getKeyTypeOps()
TypeOps for type of keys this object holds
|
V |
put(K key,
V value)
Adds a pair to the map.
|
void |
readFields(DataInput in) |
V |
remove(K key)
Removes the mapping with the given key.
|
int |
size()
Number of elements in this list
|
Iterator<V> |
valueIterator()
Iterator over map values.
|
Collection<V> |
values()
A collection of all values.
|
void |
write(DataOutput out) |
public BasicObject2ObjectOpenHashMap(WritableWriter<K> keyWriter, WritableWriter<V> valueWriter)
keyWriter - Writer of keysvalueWriter - Writer of valuespublic BasicObject2ObjectOpenHashMap(int capacity,
WritableWriter<K> keyWriter,
WritableWriter<V> valueWriter)
capacity - Map capacitykeyWriter - Writer of keysvalueWriter - Writer of valuespublic void clear()
Basic2ObjectMapclear in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>public int size()
Basic2ObjectMapsize in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>public boolean containsKey(K key)
Basic2ObjectMapcontainsKey in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>key - Keypublic V put(K key, V value)
Basic2ObjectMapput in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>key - Keyvalue - Value.public V get(K key)
Basic2ObjectMapget in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>key - Keypublic V remove(K key)
Basic2ObjectMapremove in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>key - Keypublic PrimitiveIdTypeOps<K> getKeyTypeOps()
Basic2ObjectMapgetKeyTypeOps in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>public Iterator<K> fastKeyIterator()
Basic2ObjectMapfastKeyIterator in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>public Iterator<V> valueIterator()
Basic2ObjectMapvalueIterator in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>public Collection<V> values()
Basic2ObjectMapvalues in class Basic2ObjectMap<K extends org.apache.hadoop.io.Writable,V>public void write(DataOutput out) throws IOException
IOExceptionpublic void readFields(DataInput in) throws IOException
IOExceptionCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.