Package org.apache.hadoop.io
Class SortedMapWritable<K extends WritableComparable<? super K>>
java.lang.Object
org.apache.hadoop.io.AbstractMapWritable
org.apache.hadoop.io.SortedMapWritable<K>
@Public
@Stable
public class SortedMapWritable<K extends WritableComparable<? super K>>
extends AbstractMapWritable
implements SortedMap<K,Writable>
A Writable SortedMap.
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptiondefault constructor.SortedMapWritable(SortedMapWritable<K> other) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Comparator<? super K>booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanfirstKey()inthashCode()booleanisEmpty()keySet()lastKey()voidvoidreadFields(DataInput in) Deserialize the fields of this object fromin.intsize()values()voidwrite(DataOutput out) Serialize the fields of this object toout.Methods inherited from class org.apache.hadoop.io.AbstractMapWritable
addToMap, copy, getClass, getConf, getId, setConfMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
SortedMapWritable
public SortedMapWritable()default constructor. -
SortedMapWritable
Copy constructor.- Parameters:
other- the map to copy from
-
-
Method Details
-
comparator
- Specified by:
comparatorin interfaceSortedMap<K extends WritableComparable<? super K>,Writable>
-
firstKey
-
headMap
-
lastKey
-
subMap
-
tailMap
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<K extends WritableComparable<? super K>,Writable>
-
containsValue
- Specified by:
containsValuein interfaceMap<K extends WritableComparable<? super K>,Writable>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Overrides:
readFieldsin classAbstractMapWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Overrides:
writein classAbstractMapWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
equals
-
hashCode
public int hashCode()
-