@InterfaceAudience.Public @InterfaceStability.Stable public class SortedMapWritable<K extends WritableComparable<? super K>> extends AbstractMapWritable implements SortedMap<K,Writable>
Constructor and Description |
---|
SortedMapWritable()
default constructor.
|
SortedMapWritable(SortedMapWritable<K> other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Comparator<? super K> |
comparator() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,Writable>> |
entrySet() |
boolean |
equals(Object obj) |
K |
firstKey() |
Writable |
get(Object key) |
int |
hashCode() |
SortedMap<K,Writable> |
headMap(K toKey) |
boolean |
isEmpty() |
Set<K> |
keySet() |
K |
lastKey() |
Writable |
put(K key,
Writable value) |
void |
putAll(Map<? extends K,? extends Writable> t) |
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
Writable |
remove(Object key) |
int |
size() |
SortedMap<K,Writable> |
subMap(K fromKey,
K toKey) |
SortedMap<K,Writable> |
tailMap(K fromKey) |
Collection<Writable> |
values() |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
addToMap, copy, getClass, getConf, getId, setConf
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public SortedMapWritable()
public SortedMapWritable(SortedMapWritable<K> other)
other
- the map to copy frompublic Comparator<? super K> comparator()
comparator
in interface SortedMap<K extends WritableComparable<? super K>,Writable>
public K firstKey()
public K lastKey()
public void clear()
public boolean containsKey(Object key)
containsKey
in interface Map<K extends WritableComparable<? super K>,Writable>
public boolean containsValue(Object value)
containsValue
in interface Map<K extends WritableComparable<? super K>,Writable>
public boolean isEmpty()
public int size()
public Collection<Writable> values()
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
readFields
in class AbstractMapWritable
in
- DataInput
to deseriablize this object from.IOException
- any other problem for readFields.public void write(DataOutput out) throws IOException
Writable
out
.write
in interface Writable
write
in class AbstractMapWritable
out
- DataOuput
to serialize this object into.IOException
- any other problem for write.public boolean equals(Object obj)
Copyright © 2023 Apache Software Foundation. All rights reserved.