@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, setConfclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic 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
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface WritablereadFields in class AbstractMapWritablein - DataInput to deseriablize this object from.IOException - any other problem for readFields.public void write(DataOutput out) throws IOException
Writableout.write in interface Writablewrite in class AbstractMapWritableout - 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.