K
- Key typeV
- Value typepublic abstract class Basic2ObjectMap<K,V> extends Object implements org.apache.hadoop.io.Writable
Modifier and Type | Class and Description |
---|---|
static class |
Basic2ObjectMap.BasicInt2ObjectOpenHashMap<V>
IntWritable implementation of Basic2ObjectMap
|
static class |
Basic2ObjectMap.BasicLong2ObjectOpenHashMap<V>
LongWritable implementation of Basic2ObjectMap
|
static class |
Basic2ObjectMap.BasicObject2ObjectOpenHashMap<K extends org.apache.hadoop.io.Writable,V>
Writable implementation of Basic2ObjectMap
|
protected class |
Basic2ObjectMap.ReusableIterator<Iter extends Iterator<?>>
Iterator that reuses key object.
|
Constructor and Description |
---|
Basic2ObjectMap() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Removes all of the elements from this list.
|
abstract boolean |
containsKey(K key)
Checks whether key is present in the map
|
abstract Iterator<K> |
fastKeyIterator()
Fast iterator over keys within this map, which doesn't allocate new
element for each returned element.
|
abstract V |
get(K key)
Get value for a given key
|
abstract PrimitiveIdTypeOps<K> |
getKeyTypeOps()
TypeOps for type of keys this object holds
|
abstract V |
put(K key,
V value)
Adds a pair to the map.
|
abstract V |
remove(K key)
Removes the mapping with the given key.
|
abstract int |
size()
Number of elements in this list
|
abstract Iterator<V> |
valueIterator()
Iterator over map values.
|
abstract Collection<V> |
values()
A collection of all values.
|
public abstract void clear()
public abstract int size()
public abstract boolean containsKey(K key)
key
- Keypublic abstract V put(K key, V value)
key
- Keyvalue
- Value.public abstract V get(K key)
key
- Keypublic abstract V remove(K key)
key
- Keypublic abstract PrimitiveIdTypeOps<K> getKeyTypeOps()
public abstract Iterator<K> fastKeyIterator()
public abstract Iterator<V> valueIterator()
public abstract Collection<V> values()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.