Class AbstractMutableIntValuesMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
- All Implemented Interfaces:
IntIterable,IntValuesMap,MutableIntValuesMap,PrimitiveIterable
- Direct Known Subclasses:
ByteIntHashMap,CharIntHashMap,DoubleIntHashMap,FloatIntHashMap,IntIntHashMap,LongIntHashMap,ShortIntHashMap
public abstract class AbstractMutableIntValuesMap
extends AbstractIntIterable
implements MutableIntValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
- Since:
- 6.0.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(IntPredicate predicate) Returns true if all of the elements in the IntIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(IntPredicate predicate) Returns true if any of the elements in the IntIterable return true for the specified predicate, otherwise returns false.voidappendString(Appendable appendable, String start, String separator, String end) Prints a string representation of this collection onto the givenAppendable.chunk(int size) Partitions elements in fixed size chunks.<V> MutableBag<V>collect(IntToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.booleancontains(int value) Returns true if the value is contained in the IntIterable, and false if it is not.booleancontainsAll(IntIterable source) Returns true if all of the values specified in the source IntIterable are contained in the IntIterable, and false if they are not.booleancontainsValue(int value) Returns whether or not this map contains the value.intcount(IntPredicate predicate) Returns a count of the number of elements in the IntIterable that return true for the specified predicate.intdetectIfNone(IntPredicate predicate, int value) voideach(IntProcedure procedure) A synonym for forEach.voidforEachValue(IntProcedure procedure) Iterates through each value in this map.booleanisEmpty()Returns true if this iterable has zero items.intmax()intmin()booleannotEmpty()The English equivalent of !this.isEmpty()reject(IntPredicate predicate) Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.select(IntPredicate predicate) Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.intsize()Returns the number of items in this iterable.longsum()int[]toArray()Converts the IntIterable to a primitive int array.int[]toArray(int[] target) Converts the IntIterable to a primitive int array.Methods inherited from class org.eclipse.collections.impl.primitive.AbstractIntIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.collections.api.IntIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.map.primitive.IntValuesMap
tap, valuesMethods inherited from interface org.eclipse.collections.api.map.primitive.MutableIntValuesMap
clear, intIteratorMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
AbstractMutableIntValuesMap
public AbstractMutableIntValuesMap()
-
-
Method Details
-
contains
public boolean contains(int value) Description copied from interface:IntIterableReturns true if the value is contained in the IntIterable, and false if it is not.- Specified by:
containsin interfaceIntIterable
-
containsAll
Description copied from interface:IntIterableReturns true if all of the values specified in the source IntIterable are contained in the IntIterable, and false if they are not.- Specified by:
containsAllin interfaceIntIterable
-
max
public int max()- Specified by:
maxin interfaceIntIterable
-
min
public int min()- Specified by:
minin interfaceIntIterable
-
size
public int size()Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
each
Description copied from interface:IntIterableA synonym for forEach.- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
appendString
Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable
-
toArray
public int[] toArray()Description copied from interface:IntIterableConverts the IntIterable to a primitive int array.- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target) Description copied from interface:IntIterableConverts the IntIterable to a primitive int array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArrayin interfaceIntIterable
-
select
Description copied from interface:IntIterableReturns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntValuesMap- Specified by:
selectin interfaceMutableIntValuesMap
-
reject
Description copied from interface:IntIterableReturns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntValuesMap- Specified by:
rejectin interfaceMutableIntValuesMap
-
collect
Description copied from interface:IntIterableReturns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntValuesMap- Specified by:
collectin interfaceMutableIntValuesMap
-
detectIfNone
- Specified by:
detectIfNonein interfaceIntIterable
-
count
Description copied from interface:IntIterableReturns a count of the number of elements in the IntIterable that return true for the specified predicate.- Specified by:
countin interfaceIntIterable
-
anySatisfy
Description copied from interface:IntIterableReturns true if any of the elements in the IntIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
Description copied from interface:IntIterableReturns true if all of the elements in the IntIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceIntIterable
-
chunk
Description copied from interface:IntIterablePartitions elements in fixed size chunks.- Specified by:
chunkin interfaceIntIterable- Parameters:
size- the number of elements per chunk- Returns:
- A
RichIterablecontainingIntIterables of sizesize, except the last will be truncated if the elements don't divide evenly.
-
sum
public long sum()- Specified by:
sumin interfaceIntIterable
-
containsValue
public boolean containsValue(int value) Description copied from interface:IntValuesMapReturns whether or not this map contains the value.- Specified by:
containsValuein interfaceIntValuesMap- Parameters:
value- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:IntValuesMapIterates through each value in this map.- Specified by:
forEachValuein interfaceIntValuesMap- Parameters:
procedure- the procedure to invoke for each value in this map.
-