Interface FixedSizeMap<K,V>
- All Superinterfaces:
Cloneable, InternalIterable<V>, Iterable<V>, Map<K,V>, MapIterable<K, V>, MutableMap<K, V>, MutableMapIterable<K, V>, RichIterable<V>, UnsortedMapIterable<K, V>
- All Known Implementing Classes:
AbstractMemoryEfficientMutableMap, DoubletonMap, EmptyMap, SingletonMap, TripletonMap
A FixedSizeMap is a map that may be mutated, but cannot grow or shrink in size.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voiddefault voidputAllMapIterable(MapIterable<? extends K, ? extends V> mapIterable) booleanremoveAllKeys(Set<? extends K> keys) Remove entries from the map at the specifiedkeys.booleanremoveIf(Predicate2<? super K, ? super V> predicate) Remove an entry from the map if thepredicateevaluates to true.Remove an entry from the map at the specifiedkey.Executes the Procedure for each value of the map and returnsthis.default FixedSizeMap<K, V> Similar toMap.putAll(Map), but returns this instead of voiddefault FixedSizeMap<K, V> withMapIterable(MapIterable<? extends K, ? extends V> mapIterable) Methods inherited from interface InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface MapIterable
containsKey, containsValue, detect, detectOptional, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, getIfAbsentValue, getIfAbsentWith, hashCode, ifPresentApply, injectIntoKeyValue, keysView, keyValuesView, parallelStream, spliterator, stream, toString, valuesViewMethods inherited from interface MutableMap
aggregateBy, aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, clone, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectKeysAndValues, collectKeysUnique, collectLong, collectShort, collectValues, collectWith, flatCollect, flatCollectWith, flip, flipUniqueValues, groupBy, groupByEach, groupByUniqueKey, newEmpty, partition, partitionWith, reduceBy, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, withAllKeyValueArguments, withAllKeyValues, withKeyValue, withoutAllKeys, withoutKey, zip, zipWithIndexMethods inherited from interface MutableMapIterable
add, countBy, countByEach, countByWith, forEach, getIfAbsentPut, getIfAbsentPut, getIfAbsentPutWith, getIfAbsentPutWithKey, getOrDefault, putPair, sumByDouble, sumByFloat, sumByInt, sumByLong, toImmutable, updateValue, updateValueWithMethods inherited from interface 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, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, size, 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, zip, zipWithIndexMethods inherited from interface UnsortedMapIterable
toImmutable
-
Method Details
-
clear
void clear()- Specified by:
clearin interfaceMap<K,V> - Throws:
UnsupportedOperationException- theclearoperation is not supported by this map.
-
put
-
putAll
-
remove
-
removeKey
Description copied from interface:MutableMapIterableRemove an entry from the map at the specifiedkey.- Specified by:
removeKeyin interfaceMutableMapIterable<K,V> - Returns:
- The value removed from entry at key, or null if not found.
- Throws:
UnsupportedOperationException- theremoveKeyoperation is not supported by this map.- See Also:
-
removeAllKeys
Description copied from interface:MutableMapIterableRemove entries from the map at the specifiedkeys.- Specified by:
removeAllKeysin interfaceMutableMapIterable<K,V> - Returns:
trueif this map changed as a result of the call- Throws:
UnsupportedOperationException- theremoveAllKeysoperation is not supported by this map.
-
removeIf
Description copied from interface:MutableMapIterableRemove an entry from the map if thepredicateevaluates to true.- Specified by:
removeIfin interfaceMutableMapIterable<K,V> - Returns:
- true if any entry is removed.
- Throws:
UnsupportedOperationException- theremoveIfoperation is not supported by this map.
-
tap
Description copied from interface:MapIterableExecutes the Procedure for each value of the map and returnsthis.return peopleByCity.tap(person -> LOGGER.info(person.getName()));
- Specified by:
tapin interfaceMapIterable<K,V> - Specified by:
tapin interfaceMutableMap<K,V> - Specified by:
tapin interfaceMutableMapIterable<K,V> - Specified by:
tapin interfaceRichIterable<K>- Specified by:
tapin interfaceUnsortedMapIterable<K,V> - See Also:
-
withMap
Description copied from interface:MutableMapIterableSimilar toMap.putAll(Map), but returns this instead of void- Specified by:
withMapin interfaceMutableMap<K,V> - Specified by:
withMapin interfaceMutableMapIterable<K,V> - See Also:
-
withMapIterable
- Specified by:
withMapIterablein interfaceMutableMap<K,V> - Specified by:
withMapIterablein interfaceMutableMapIterable<K,V>
-
putAllMapIterable
- Specified by:
putAllMapIterablein interfaceMutableMapIterable<K,V>
-