Class ImmutableUnifiedMapWithHashingStrategy<K,V>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<V>
-
- org.eclipse.collections.impl.map.AbstractMapIterable<K,V>
-
- org.eclipse.collections.impl.map.immutable.AbstractImmutableMap<K,V>
-
- org.eclipse.collections.impl.map.strategy.immutable.ImmutableUnifiedMapWithHashingStrategy<K,V>
-
- All Implemented Interfaces:
Serializable,Iterable<V>,Map<K,V>,InternalIterable<V>,ImmutableMap<K,V>,ImmutableMapIterable<K,V>,MapIterable<K,V>,UnsortedMapIterable<K,V>,RichIterable<V>,BatchIterable<V>
public class ImmutableUnifiedMapWithHashingStrategy<K,V> extends AbstractImmutableMap<K,V> implements BatchIterable<V>, Serializable
- See Also:
ImmutableMap, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImmutableUnifiedMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, Pair<K,V>... pairs)ImmutableUnifiedMapWithHashingStrategy(UnifiedMapWithHashingStrategy<K,V> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbatchForEach(Procedure<? super V> procedure, int sectionIndex, int sectionCount)<R> ImmutableMap<K,R>collectValues(Function2<? super K,? super V,? extends R> function)booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<K,V>>entrySet()booleanequals(Object o)voidforEachKey(Procedure<? super K> procedure)voidforEachKeyValue(Procedure2<? super K,? super V> procedure)voidforEachValue(Procedure<? super V> procedure)<P> voidforEachWith(Procedure2<? super V,? super P> procedure, P parameter)voidforEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)Vget(Object key)intgetBatchCount(int batchSize)inthashCode()Set<K>keySet()RichIterable<K>keysView()RichIterable<Pair<K,V>>keyValuesView()ImmutableMap<K,V>newWithAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs)ImmutableMap<K,V>newWithAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)ImmutableMap<K,V>newWithKeyValue(K key, V value)ImmutableMap<K,V>newWithMap(Map<? extends K,? extends V> map)ImmutableMap<K,V>newWithMapIterable(MapIterable<? extends K,? extends V> mapIterable)ImmutableMap<K,V>newWithoutAllKeys(Iterable<? extends K> keys)ImmutableMap<K,V>newWithoutKey(K key)ImmutableMap<K,V>reject(Predicate2<? super K,? super V> predicate)ImmutableMap<K,V>select(Predicate2<? super K,? super V> predicate)intsize()StringtoString()Returns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.Collection<V>values()RichIterable<V>valuesView()-
Methods inherited from class org.eclipse.collections.impl.map.immutable.AbstractImmutableMap
aggregateBy, castToMap, clear, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, countBy, countByEach, countByWith, detect, detectOptional, flatCollect, flip, flipUniqueValues, forEach, groupBy, groupByEach, groupByUniqueKey, iterator, partition, partitionWith, put, putAll, reject, rejectWith, remove, select, selectInstancesOf, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, tap, toImmutable, toMap, zip, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.map.AbstractMapIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, asLazy, chunk, contains, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, getFirst, getIfAbsent, getIfAbsentValue, getIfAbsentWith, getLast, getOnly, getOrDefault, ifPresentApply, noneSatisfy, noneSatisfyWith, toArray, toArray
-
Methods 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, 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, zipWithIndex
-
Methods inherited from interface org.eclipse.collections.impl.parallel.BatchIterable
forEach
-
Methods inherited from interface org.eclipse.collections.api.map.ImmutableMap
aggregateBy, aggregateInPlaceBy, flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, getOrDefault, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Methods inherited from interface org.eclipse.collections.api.map.MapIterable
getIfAbsent, getIfAbsentValue, getIfAbsentWith, getOrDefault, ifPresentApply, injectIntoKeyValue, parallelStream, spliterator, stream
-
Methods 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, 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, 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, zip, zipWithIndex
-
-
-
-
Constructor Detail
-
ImmutableUnifiedMapWithHashingStrategy
public ImmutableUnifiedMapWithHashingStrategy(UnifiedMapWithHashingStrategy<K,V> delegate)
-
ImmutableUnifiedMapWithHashingStrategy
public ImmutableUnifiedMapWithHashingStrategy(HashingStrategy<? super K> hashingStrategy, Pair<K,V>... pairs)
-
-
Method Detail
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String 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:
AbstractCollection.toString()
-
size
public int size()
- Specified by:
sizein interfaceBatchIterable<K>- Specified by:
sizein interfaceMap<K,V>- Specified by:
sizein interfaceRichIterable<K>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<K,V>- Specified by:
containsKeyin interfaceMapIterable<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<K,V>- Specified by:
containsValuein interfaceMapIterable<K,V>
-
getBatchCount
public int getBatchCount(int batchSize)
- Specified by:
getBatchCountin interfaceBatchIterable<K>
-
batchForEach
public void batchForEach(Procedure<? super V> procedure, int sectionIndex, int sectionCount)
- Specified by:
batchForEachin interfaceBatchIterable<K>
-
forEachValue
public void forEachValue(Procedure<? super V> procedure)
- Specified by:
forEachValuein interfaceMapIterable<K,V>- Overrides:
forEachValuein classAbstractMapIterable<K,V>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceMapIterable<K,V>- Overrides:
forEachKeyin classAbstractMapIterable<K,V>
-
forEachKeyValue
public void forEachKeyValue(Procedure2<? super K,? super V> procedure)
- Specified by:
forEachKeyValuein interfaceMapIterable<K,V>
-
keysView
public RichIterable<K> keysView()
- Specified by:
keysViewin interfaceMapIterable<K,V>
-
valuesView
public RichIterable<V> valuesView()
- Specified by:
valuesViewin interfaceMapIterable<K,V>
-
keyValuesView
public RichIterable<Pair<K,V>> keyValuesView()
- Specified by:
keyValuesViewin interfaceMapIterable<K,V>
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
- Specified by:
forEachWithIndexin interfaceInternalIterable<K>- Overrides:
forEachWithIndexin classAbstractMapIterable<K,V>
-
forEachWith
public <P> void forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
- Specified by:
forEachWithin interfaceInternalIterable<K>- Overrides:
forEachWithin classAbstractMapIterable<K,V>
-
newWithKeyValue
public ImmutableMap<K,V> newWithKeyValue(K key, V value)
- Specified by:
newWithKeyValuein interfaceImmutableMap<K,V>- Specified by:
newWithKeyValuein interfaceImmutableMapIterable<K,V>- Overrides:
newWithKeyValuein classAbstractImmutableMap<K,V>
-
newWithAllKeyValues
public ImmutableMap<K,V> newWithAllKeyValues(Iterable<? extends Pair<? extends K,? extends V>> keyValues)
- Specified by:
newWithAllKeyValuesin interfaceImmutableMap<K,V>- Specified by:
newWithAllKeyValuesin interfaceImmutableMapIterable<K,V>- Overrides:
newWithAllKeyValuesin classAbstractImmutableMap<K,V>
-
newWithMap
public ImmutableMap<K,V> newWithMap(Map<? extends K,? extends V> map)
- Specified by:
newWithMapin interfaceImmutableMap<K,V>- Specified by:
newWithMapin interfaceImmutableMapIterable<K,V>- Overrides:
newWithMapin classAbstractImmutableMap<K,V>
-
newWithMapIterable
public ImmutableMap<K,V> newWithMapIterable(MapIterable<? extends K,? extends V> mapIterable)
- Specified by:
newWithMapIterablein interfaceImmutableMap<K,V>- Specified by:
newWithMapIterablein interfaceImmutableMapIterable<K,V>- Overrides:
newWithMapIterablein classAbstractImmutableMap<K,V>
-
newWithAllKeyValueArguments
public ImmutableMap<K,V> newWithAllKeyValueArguments(Pair<? extends K,? extends V>... keyValuePairs)
- Specified by:
newWithAllKeyValueArgumentsin interfaceImmutableMap<K,V>- Specified by:
newWithAllKeyValueArgumentsin interfaceImmutableMapIterable<K,V>- Overrides:
newWithAllKeyValueArgumentsin classAbstractImmutableMap<K,V>
-
newWithoutKey
public ImmutableMap<K,V> newWithoutKey(K key)
- Specified by:
newWithoutKeyin interfaceImmutableMap<K,V>- Specified by:
newWithoutKeyin interfaceImmutableMapIterable<K,V>- Overrides:
newWithoutKeyin classAbstractImmutableMap<K,V>
-
newWithoutAllKeys
public ImmutableMap<K,V> newWithoutAllKeys(Iterable<? extends K> keys)
- Specified by:
newWithoutAllKeysin interfaceImmutableMap<K,V>- Specified by:
newWithoutAllKeysin interfaceImmutableMapIterable<K,V>- Overrides:
newWithoutAllKeysin classAbstractImmutableMap<K,V>
-
collectValues
public <R> ImmutableMap<K,R> collectValues(Function2<? super K,? super V,? extends R> function)
- Specified by:
collectValuesin interfaceImmutableMap<K,V>- Specified by:
collectValuesin interfaceImmutableMapIterable<K,V>- Specified by:
collectValuesin interfaceMapIterable<K,V>- Specified by:
collectValuesin interfaceUnsortedMapIterable<K,V>- Overrides:
collectValuesin classAbstractImmutableMap<K,V>
-
select
public ImmutableMap<K,V> select(Predicate2<? super K,? super V> predicate)
- Specified by:
selectin interfaceImmutableMap<K,V>- Specified by:
selectin interfaceImmutableMapIterable<K,V>- Specified by:
selectin interfaceMapIterable<K,V>- Specified by:
selectin interfaceUnsortedMapIterable<K,V>- Overrides:
selectin classAbstractImmutableMap<K,V>
-
reject
public ImmutableMap<K,V> reject(Predicate2<? super K,? super V> predicate)
- Specified by:
rejectin interfaceImmutableMap<K,V>- Specified by:
rejectin interfaceImmutableMapIterable<K,V>- Specified by:
rejectin interfaceMapIterable<K,V>- Specified by:
rejectin interfaceUnsortedMapIterable<K,V>- Overrides:
rejectin classAbstractImmutableMap<K,V>
-
-