Class SortedMapAdapter<K,V>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<V>
org.eclipse.collections.impl.map.AbstractMapIterable<K,V>
org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable<K,V>
org.eclipse.collections.impl.map.sorted.mutable.AbstractMutableSortedMap<K,V>
org.eclipse.collections.impl.map.sorted.mutable.SortedMapAdapter<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<V>,Map<K,,V> SortedMap<K,,V> InternalIterable<V>,MapIterable<K,,V> MutableMapIterable<K,,V> MutableSortedMap<K,,V> SortedMapIterable<K,,V> OrderedIterable<V>,ReversibleIterable<V>,RichIterable<V>
This class provides a MutableSortedMap wrapper around a JDK Collections SortedMap interface instance. All the MutableSortedMap
interface methods are supported in addition to the JDK SortedMap interface methods.
To create a new wrapper around an existing SortedMap instance, use the adapt(SortedMap) factory method.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> MutableSortedMap<K, V> voidclear()clone()Comparator<? super K>booleancontainsKey(Object key) booleancontainsValue(Object value) distinct()drop(int count) entrySet()booleanfirstKey()voidforEachKeyValue(Procedure2<? super K, ? super V> procedure) inthashCode()booleanisEmpty()iterator()keySet()lastKey()newEmpty()Deprecated.partitionWhile(Predicate<? super V> predicate) voidintsize()take(int count) toString()Returns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.values()Methods inherited from class org.eclipse.collections.impl.map.sorted.mutable.AbstractMutableSortedMap
asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectKeysAndValues, collectKeysUnique, collectLong, collectShort, collectValues, collectWith, corresponds, detectIndex, detectLastIndex, flatCollect, flip, forEach, forEachWithIndex, groupBy, groupByEach, groupByUniqueKey, partition, partitionWith, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, tap, toImmutable, toStack, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withoutAllKeys, withoutKey, zip, zipWithIndexMethods inherited from class org.eclipse.collections.impl.map.mutable.AbstractMutableMapIterable
aggregateBy, collect, countBy, countByEach, countByWith, detect, detectOptional, flipUniqueValues, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, keysView, keyValuesView, reduceBy, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWith, valuesViewMethods inherited from class org.eclipse.collections.impl.map.AbstractMapIterable
allSatisfy, 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, toArrayMethods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, collect, collectIf, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, into, 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, zipWithIndexMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWithMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface org.eclipse.collections.api.map.MapIterable
detect, detectOptional, forEachKey, forEachValue, getIfAbsent, getIfAbsentValue, getIfAbsentWith, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, valuesViewMethods inherited from interface org.eclipse.collections.api.map.MutableMapIterable
add, aggregateBy, aggregateBy, aggregateInPlaceBy, countBy, countByEach, countByWith, flipUniqueValues, forEach, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWithKey, getOrDefault, putAllMapIterable, putPair, reduceBy, removeAllKeys, removeIf, sumByDouble, sumByFloat, sumByInt, sumByLong, updateValue, updateValueWithMethods inherited from interface org.eclipse.collections.api.map.sorted.MutableSortedMap
collect, collectWithIndex, flatCollectWith, getIfAbsentPutWith, withMap, withMapIterableMethods inherited from interface org.eclipse.collections.api.ordered.OrderedIterable
collectWithIndex, forEachWithIndex, getFirst, getFirstOptional, getLast, getLastOptional, indexOf, max, min, rejectWithIndex, selectWithIndex, zip, zipWithIndexMethods inherited from interface org.eclipse.collections.api.ordered.ReversibleIterable
asReversed, reverseForEach, reverseForEachWithIndexMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, 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, makeString, makeString, makeString, makeString, max, maxBy, maxByOptional, maxOptional, maxOptional, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceBy, 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, toSortedSetBy
-
Method Details
-
adapt
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceMapIterable<K,V>
-
newEmpty
Deprecated.useTreeSortedMap.newEmpty()instead (inlineable)- Specified by:
newEmptyin interfaceMutableMapIterable<K,V> - Specified by:
newEmptyin interfaceMutableSortedMap<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Specified by:
containsKeyin interfaceMapIterable<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Specified by:
containsValuein interfaceMapIterable<K,V>
-
comparator
- Specified by:
comparatorin interfaceSortedMap<K,V> - Specified by:
comparatorin interfaceSortedMapIterable<K,V>
-
size
public int size() -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMap<K,V> - Specified by:
isEmptyin interfaceRichIterable<K>- Overrides:
isEmptyin classAbstractRichIterable<V>
-
iterator
-
remove
-
putAll
-
values
-
entrySet
-
keySet
-
firstKey
-
lastKey
-
headMap
-
tailMap
-
subMap
-
clear
public void clear() -
get
-
put
-
merge
-
removeKey
- Specified by:
removeKeyin interfaceMutableMapIterable<K,V>
-
with
- Specified by:
within interfaceMutableSortedMap<K,V>
-
toString
Description copied from class:AbstractRichIterableReturns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.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());- Specified by:
toStringin interfaceMapIterable<K,V> - Specified by:
toStringin interfaceRichIterable<K>- Overrides:
toStringin classAbstractRichIterable<V>- Returns:
- a string representation of this collection.
- See Also:
-
clone
- Specified by:
clonein interfaceMutableSortedMap<K,V> - Specified by:
clonein classAbstractMutableSortedMap<K,V>
-
equals
-
hashCode
public int hashCode() -
toReversed
- Specified by:
toReversedin interfaceMutableSortedMap<K,V> - Specified by:
toReversedin interfaceReversibleIterable<K>- Specified by:
toReversedin interfaceSortedMapIterable<K,V>
-
take
- Specified by:
takein interfaceMutableSortedMap<K,V> - Specified by:
takein interfaceReversibleIterable<K>- Specified by:
takein interfaceSortedMapIterable<K,V>
-
takeWhile
- Specified by:
takeWhilein interfaceMutableSortedMap<K,V> - Specified by:
takeWhilein interfaceOrderedIterable<K>- Specified by:
takeWhilein interfaceReversibleIterable<K>- Specified by:
takeWhilein interfaceSortedMapIterable<K,V>
-
drop
- Specified by:
dropin interfaceMutableSortedMap<K,V> - Specified by:
dropin interfaceReversibleIterable<K>- Specified by:
dropin interfaceSortedMapIterable<K,V>
-
dropWhile
- Specified by:
dropWhilein interfaceMutableSortedMap<K,V> - Specified by:
dropWhilein interfaceOrderedIterable<K>- Specified by:
dropWhilein interfaceReversibleIterable<K>- Specified by:
dropWhilein interfaceSortedMapIterable<K,V>
-
partitionWhile
- Specified by:
partitionWhilein interfaceMutableSortedMap<K,V> - Specified by:
partitionWhilein interfaceOrderedIterable<K>- Specified by:
partitionWhilein interfaceReversibleIterable<K>- Specified by:
partitionWhilein interfaceSortedMapIterable<K,V>
-
distinct
- Specified by:
distinctin interfaceMutableSortedMap<K,V> - Specified by:
distinctin interfaceOrderedIterable<K>- Specified by:
distinctin interfaceReversibleIterable<K>- Specified by:
distinctin interfaceSortedMapIterable<K,V>
-
TreeSortedMap.newEmpty()instead (inlineable)