public static final class Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V> extends Basic2ObjectMap<org.apache.hadoop.io.IntWritable,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 |
---|
BasicInt2ObjectOpenHashMap(int capacity,
WritableWriter<V> valueWriter)
Constructor
|
BasicInt2ObjectOpenHashMap(WritableWriter<V> valueWriter)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all of the elements from this list.
|
boolean |
containsKey(org.apache.hadoop.io.IntWritable key)
Checks whether key is present in the map
|
Iterator<org.apache.hadoop.io.IntWritable> |
fastKeyIterator()
Fast iterator over keys within this map, which doesn't allocate new
element for each returned element.
|
V |
get(org.apache.hadoop.io.IntWritable key)
Get value for a given key
|
PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable> |
getKeyTypeOps()
TypeOps for type of keys this object holds
|
V |
put(org.apache.hadoop.io.IntWritable key,
V value)
Adds a pair to the map.
|
void |
readFields(DataInput in) |
V |
remove(org.apache.hadoop.io.IntWritable 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 BasicInt2ObjectOpenHashMap(WritableWriter<V> valueWriter)
valueWriter
- Writer of valuespublic BasicInt2ObjectOpenHashMap(int capacity, WritableWriter<V> valueWriter)
capacity
- CapacityvalueWriter
- Writer of valuespublic void clear()
Basic2ObjectMap
clear
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
public int size()
Basic2ObjectMap
size
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
public boolean containsKey(org.apache.hadoop.io.IntWritable key)
Basic2ObjectMap
containsKey
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
key
- Keypublic V put(org.apache.hadoop.io.IntWritable key, V value)
Basic2ObjectMap
put
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
key
- Keyvalue
- Value.public V get(org.apache.hadoop.io.IntWritable key)
Basic2ObjectMap
get
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
key
- Keypublic V remove(org.apache.hadoop.io.IntWritable key)
Basic2ObjectMap
remove
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
key
- Keypublic PrimitiveIdTypeOps<org.apache.hadoop.io.IntWritable> getKeyTypeOps()
Basic2ObjectMap
getKeyTypeOps
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
public Iterator<org.apache.hadoop.io.IntWritable> fastKeyIterator()
Basic2ObjectMap
fastKeyIterator
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
public Iterator<V> valueIterator()
Basic2ObjectMap
valueIterator
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
public Collection<V> values()
Basic2ObjectMap
values
in class Basic2ObjectMap<org.apache.hadoop.io.IntWritable,V>
public void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.