public class TreeSortedMap<K,V> extends AbstractMutableSortedMap<K,V> implements Externalizable
| Constructor and Description |
|---|
TreeSortedMap() |
TreeSortedMap(Comparator<? super K> comparator) |
TreeSortedMap(Comparator<? super K> comparator,
Map<? extends K,? extends V> map) |
TreeSortedMap(Map<? extends K,? extends V> map) |
TreeSortedMap(Pair<K,V>... pairs) |
TreeSortedMap(SortedMap<K,? extends V> map) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
TreeSortedMap<K,V> |
clone() |
Comparator<? super K> |
comparator() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
MutableList<V> |
distinct() |
MutableSortedMap<K,V> |
drop(int count) |
MutableSortedMap<K,V> |
dropWhile(Predicate<? super V> predicate) |
MutableSet<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
K |
firstKey() |
void |
forEachKeyValue(Procedure2<? super K,? super V> procedure2) |
V |
get(Object key) |
int |
hashCode() |
MutableSortedMap<K,V> |
headMap(K toKey) |
MutableSet<K> |
keySet() |
K |
lastKey() |
MutableSortedMap<K,V> |
newEmpty() |
static <K,V> TreeSortedMap<K,V> |
newMap() |
static <K,V> TreeSortedMap<K,V> |
newMap(Comparator<? super K> comparator) |
static <K,V> TreeSortedMap<K,V> |
newMap(Comparator<? super K> comparator,
Map<? extends K,? extends V> map) |
static <K,V> TreeSortedMap<K,V> |
newMap(Map<? extends K,? extends V> map) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(Comparator<? super K> comparator,
K key,
V value) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(Comparator<? super K> comparator,
K key1,
V value1,
K key2,
V value2) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(Comparator<? super K> comparator,
K key1,
V value1,
K key2,
V value2,
K key3,
V value3) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(Comparator<? super K> comparator,
K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(Comparator<? super K> comparator,
Pair<K,V>... pairs) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(K key,
V value) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(K key1,
V value1,
K key2,
V value2) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(K key1,
V value1,
K key2,
V value2,
K key3,
V value3) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4) |
static <K,V> TreeSortedMap<K,V> |
newMapWith(Pair<K,V>... pairs) |
PartitionMutableList<V> |
partitionWhile(Predicate<? super V> predicate) |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> map) |
void |
readExternal(ObjectInput in) |
V |
remove(Object key) |
V |
removeKey(K key) |
int |
size() |
MutableSortedMap<K,V> |
subMap(K fromKey,
K toKey) |
MutableSortedMap<K,V> |
tailMap(K fromKey) |
MutableSortedMap<K,V> |
take(int count) |
MutableSortedMap<K,V> |
takeWhile(Predicate<? super V> predicate) |
MutableSortedMap<K,V> |
toReversed() |
String |
toString()
Returns a string with the elements of the iterable separated by commas with spaces and
enclosed in square brackets.
|
MutableCollection<V> |
values() |
TreeSortedMap<K,V> |
with(K key,
V value) |
TreeSortedMap<K,V> |
with(K key1,
V value1,
K key2,
V value2) |
TreeSortedMap<K,V> |
with(K key1,
V value1,
K key2,
V value2,
K key3,
V value3) |
TreeSortedMap<K,V> |
with(K key1,
V value1,
K key2,
V value2,
K key3,
V value3,
K key4,
V value4) |
TreeSortedMap<K,V> |
with(Pair<K,V>... pairs) |
void |
writeExternal(ObjectOutput out) |
asReversed, asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectKeysAndValues, collectLong, collectShort, collectValues, collectWith, corresponds, detectIndex, detectLastIndex, flatCollect, flip, forEach, forEachWithIndex, groupBy, groupByEach, groupByUniqueKey, indexOf, partition, partitionWith, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, tap, toImmutable, toStack, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withoutAllKeys, withoutKey, zip, zipWithIndexaggregateBy, collect, countBy, countByEach, countByWith, detect, detectOptional, flipUniqueValues, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, iterator, keysView, keyValuesView, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWith, valuesViewallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, forEachKey, forEachValue, forEachWith, forEachWithIndex, getFirst, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getLast, getOnly, getOrDefault, ifPresentApply, noneSatisfy, noneSatisfyWith, toArray, toArrayappendString, appendString, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, zip, zipWithIndexcollect, collectWithIndex, flatCollectWith, getIfAbsentPutWith, withMap, withMapIterableadd, aggregateBy, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, flipUniqueValues, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWithKey, getOrDefault, putAllMapIterable, putPair, removeAllKeys, removeIf, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWithdetect, detectOptional, forEachKey, forEachValue, getIfAbsent, getIfAbsentValue, getIfAbsentWith, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, valuesViewreverseForEach, reverseForEachWithIndexcollectWithIndex, forEachWithIndex, getFirst, getFirstOptional, getLast, getLastOptional, max, min, rejectWithIndex, selectWithIndex, zip, zipWithIndexaggregateBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, maxBy, maxByOptional, maxOptional, maxOptional, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetByforEach, forEachWithcompute, computeIfAbsent, computeIfPresent, forEach, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAllpublic TreeSortedMap()
public TreeSortedMap(Comparator<? super K> comparator)
public TreeSortedMap(Comparator<? super K> comparator, Map<? extends K,? extends V> map)
public static <K,V> TreeSortedMap<K,V> newMap()
public static <K,V> TreeSortedMap<K,V> newMap(Comparator<? super K> comparator)
public static <K,V> TreeSortedMap<K,V> newMap(Map<? extends K,? extends V> map)
public static <K,V> TreeSortedMap<K,V> newMap(Comparator<? super K> comparator, Map<? extends K,? extends V> map)
public static <K,V> TreeSortedMap<K,V> newMapWith(Pair<K,V>... pairs)
public static <K,V> TreeSortedMap<K,V> newMapWith(Comparator<? super K> comparator, Pair<K,V>... pairs)
public static <K,V> TreeSortedMap<K,V> newMapWith(K key, V value)
public static <K,V> TreeSortedMap<K,V> newMapWith(K key1, V value1, K key2, V value2)
public static <K,V> TreeSortedMap<K,V> newMapWith(K key1, V value1, K key2, V value2, K key3, V value3)
public static <K,V> TreeSortedMap<K,V> newMapWith(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public static <K,V> TreeSortedMap<K,V> newMapWith(Comparator<? super K> comparator, K key, V value)
public static <K,V> TreeSortedMap<K,V> newMapWith(Comparator<? super K> comparator, K key1, V value1, K key2, V value2)
public static <K,V> TreeSortedMap<K,V> newMapWith(Comparator<? super K> comparator, K key1, V value1, K key2, V value2, K key3, V value3)
public static <K,V> TreeSortedMap<K,V> newMapWith(Comparator<? super K> comparator, K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public TreeSortedMap<K,V> with(K key, V value)
public TreeSortedMap<K,V> with(K key1, V value1, K key2, V value2, K key3, V value3, K key4, V value4)
public TreeSortedMap<K,V> with(Pair<K,V>... pairs)
with in interface MutableSortedMap<K,V>public int size()
public MutableSortedMap<K,V> newEmpty()
newEmpty in interface MutableMapIterable<K,V>newEmpty in interface MutableSortedMap<K,V>public TreeSortedMap<K,V> clone()
clone in interface MutableSortedMap<K,V>clone in class AbstractMutableSortedMap<K,V>public boolean equals(Object o)
public int hashCode()
public void forEachKeyValue(Procedure2<? super K,? super V> procedure2)
forEachKeyValue in interface MapIterable<K,V>public MutableSet<Map.Entry<K,V>> entrySet()
public MutableSet<K> keySet()
public MutableCollection<V> values()
public Comparator<? super K> comparator()
comparator in interface SortedMap<K,V>comparator in interface SortedMapIterable<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>containsKey in interface MapIterable<K,V>public MutableSortedMap<K,V> headMap(K toKey)
public MutableSortedMap<K,V> tailMap(K fromKey)
public MutableSortedMap<K,V> subMap(K fromKey, K toKey)
public boolean containsValue(Object value)
containsValue in interface Map<K,V>containsValue in interface MapIterable<K,V>public MutableSortedMap<K,V> toReversed()
toReversed in interface MutableSortedMap<K,V>toReversed in interface SortedMapIterable<K,V>toReversed in interface ReversibleIterable<V>public MutableSortedMap<K,V> take(int count)
take in interface MutableSortedMap<K,V>take in interface SortedMapIterable<K,V>take in interface ReversibleIterable<V>public MutableSortedMap<K,V> takeWhile(Predicate<? super V> predicate)
takeWhile in interface MutableSortedMap<K,V>takeWhile in interface SortedMapIterable<K,V>takeWhile in interface OrderedIterable<V>takeWhile in interface ReversibleIterable<V>public MutableSortedMap<K,V> drop(int count)
drop in interface MutableSortedMap<K,V>drop in interface SortedMapIterable<K,V>drop in interface ReversibleIterable<V>public MutableSortedMap<K,V> dropWhile(Predicate<? super V> predicate)
dropWhile in interface MutableSortedMap<K,V>dropWhile in interface SortedMapIterable<K,V>dropWhile in interface OrderedIterable<V>dropWhile in interface ReversibleIterable<V>public PartitionMutableList<V> partitionWhile(Predicate<? super V> predicate)
partitionWhile in interface MutableSortedMap<K,V>partitionWhile in interface SortedMapIterable<K,V>partitionWhile in interface OrderedIterable<V>partitionWhile in interface ReversibleIterable<V>public MutableList<V> distinct()
distinct in interface MutableSortedMap<K,V>distinct in interface SortedMapIterable<K,V>distinct in interface OrderedIterable<V>distinct in interface ReversibleIterable<V>public String toString()
AbstractRichIterable
Assert.assertEquals("[]", Lists.mutable.empty().toString());
Assert.assertEquals("[1]", Lists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", Lists.mutable.with(1, 2, 3).toString());
toString in interface MapIterable<K,V>toString in interface RichIterable<V>toString in class AbstractRichIterable<V>AbstractCollection.toString()public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2004–2022. All rights reserved.