Class AbstractMutableShortValuesMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractShortIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
- All Implemented Interfaces:
MutableShortValuesMap
,ShortValuesMap
,PrimitiveIterable
,ShortIterable
- Direct Known Subclasses:
ByteShortHashMap
,CharShortHashMap
,DoubleShortHashMap
,FloatShortHashMap
,IntShortHashMap
,LongShortHashMap
,ShortShortHashMap
public abstract class AbstractMutableShortValuesMap
extends AbstractShortIterable
implements MutableShortValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
- Since:
- 6.0.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
allSatisfy
(ShortPredicate predicate) Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy
(ShortPredicate predicate) Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.void
appendString
(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
(ShortToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
contains
(short value) Returns true if the value is contained in the ShortIterable, and false if it is not.boolean
containsAll
(ShortIterable source) Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.boolean
containsValue
(short value) Returns whether or not this map contains the value.int
count
(ShortPredicate predicate) Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.short
detectIfNone
(ShortPredicate predicate, short value) void
each
(ShortProcedure procedure) A synonym for forEach.void
forEachValue
(ShortProcedure procedure) Iterates through each value in this map.boolean
isEmpty()
Returns true if this iterable has zero items.short
max()
short
min()
boolean
notEmpty()
The English equivalent of !this.isEmpty()reject
(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.select
(ShortPredicate predicate) Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.long
sum()
short[]
toArray()
Converts the ShortIterable to a primitive short array.short[]
toArray
(short[] target) Converts the ShortIterable to a primitive short array.Methods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortValuesMap
clear, shortIterator
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
Methods inherited from interface org.eclipse.collections.api.ShortIterable
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, toSortedListBy
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortValuesMap
tap, values
-
Constructor Details
-
AbstractMutableShortValuesMap
public AbstractMutableShortValuesMap()
-
-
Method Details
-
contains
public boolean contains(short value) Description copied from interface:ShortIterable
Returns true if the value is contained in the ShortIterable, and false if it is not.- Specified by:
contains
in interfaceShortIterable
-
containsAll
Description copied from interface:ShortIterable
Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.- Specified by:
containsAll
in interfaceShortIterable
-
max
public short max()- Specified by:
max
in interfaceShortIterable
-
min
public short min()- Specified by:
min
in interfaceShortIterable
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
-
each
Description copied from interface:ShortIterable
A synonym for forEach.- Specified by:
each
in interfaceShortIterable
- Since:
- 7.0.
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
-
toArray
public short[] toArray()Description copied from interface:ShortIterable
Converts the ShortIterable to a primitive short array.- Specified by:
toArray
in interfaceShortIterable
-
toArray
public short[] toArray(short[] target) Description copied from interface:ShortIterable
Converts the ShortIterable to a primitive short 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:
toArray
in interfaceShortIterable
-
select
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
select
in interfaceMutableShortValuesMap
- Specified by:
select
in interfaceShortIterable
- Specified by:
select
in interfaceShortValuesMap
-
reject
Description copied from interface:ShortIterable
Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
reject
in interfaceMutableShortValuesMap
- Specified by:
reject
in interfaceShortIterable
- Specified by:
reject
in interfaceShortValuesMap
-
collect
Description copied from interface:ShortIterable
Returns 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:
collect
in interfaceMutableShortValuesMap
- Specified by:
collect
in interfaceShortIterable
- Specified by:
collect
in interfaceShortValuesMap
-
detectIfNone
- Specified by:
detectIfNone
in interfaceShortIterable
-
count
Description copied from interface:ShortIterable
Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.- Specified by:
count
in interfaceShortIterable
-
anySatisfy
Description copied from interface:ShortIterable
Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceShortIterable
-
allSatisfy
Description copied from interface:ShortIterable
Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceShortIterable
-
chunk
Description copied from interface:ShortIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceShortIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingShortIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
sum
public long sum()- Specified by:
sum
in interfaceShortIterable
-
containsValue
public boolean containsValue(short value) Description copied from interface:ShortValuesMap
Returns whether or not this map contains the value.- Specified by:
containsValue
in interfaceShortValuesMap
- Parameters:
value
- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:ShortValuesMap
Iterates through each value in this map.- Specified by:
forEachValue
in interfaceShortValuesMap
- Parameters:
procedure
- the procedure to invoke for each value in this map.
-