Class AbstractMutableByteValuesMap
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractByteIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableByteValuesMap
- All Implemented Interfaces:
ByteIterable
,ByteValuesMap
,MutableByteValuesMap
,PrimitiveIterable
- Direct Known Subclasses:
ByteByteHashMap
,CharByteHashMap
,DoubleByteHashMap
,FloatByteHashMap
,IntByteHashMap
,LongByteHashMap
,ShortByteHashMap
public abstract class AbstractMutableByteValuesMap
extends AbstractByteIterable
implements MutableByteValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
- Since:
- 6.0.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allSatisfy
(BytePredicate predicate) Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.boolean
anySatisfy
(BytePredicate predicate) Returns true if any of the elements in the ByteIterable 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
(ByteToObjectFunction<? extends V> function) Returns a new collection with the results of applying the specified function on each element of the source collection.boolean
contains
(byte value) Returns true if the value is contained in the ByteIterable, and false if it is not.boolean
containsAll
(ByteIterable source) Returns true if all of the values specified in the source ByteIterable are contained in the ByteIterable, and false if they are not.boolean
containsValue
(byte value) Returns whether or not this map contains the value.int
count
(BytePredicate predicate) Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.byte
detectIfNone
(BytePredicate predicate, byte value) void
each
(ByteProcedure procedure) A synonym for forEach.void
forEachValue
(ByteProcedure procedure) Iterates through each value in this map.boolean
isEmpty()
Returns true if this iterable has zero items.byte
max()
byte
min()
boolean
notEmpty()
The English equivalent of !this.isEmpty()reject
(BytePredicate predicate) Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.select
(BytePredicate predicate) Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.int
size()
Returns the number of items in this iterable.long
sum()
byte[]
toArray()
Converts the ByteIterable to a primitive byte array.byte[]
toArray
(byte[] target) Converts the ByteIterable to a primitive byte array.Methods inherited from class org.eclipse.collections.impl.primitive.AbstractByteIterable
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.ByteIterable
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.ByteValuesMap
tap, values
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableByteValuesMap
byteIterator, clear
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
AbstractMutableByteValuesMap
public AbstractMutableByteValuesMap()
-
-
Method Details
-
contains
public boolean contains(byte value) Description copied from interface:ByteIterable
Returns true if the value is contained in the ByteIterable, and false if it is not.- Specified by:
contains
in interfaceByteIterable
-
containsAll
Description copied from interface:ByteIterable
Returns true if all of the values specified in the source ByteIterable are contained in the ByteIterable, and false if they are not.- Specified by:
containsAll
in interfaceByteIterable
-
max
public byte max()- Specified by:
max
in interfaceByteIterable
-
min
public byte min()- Specified by:
min
in interfaceByteIterable
-
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:ByteIterable
A synonym for forEach.- Specified by:
each
in interfaceByteIterable
- 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 byte[] toArray()Description copied from interface:ByteIterable
Converts the ByteIterable to a primitive byte array.- Specified by:
toArray
in interfaceByteIterable
-
toArray
public byte[] toArray(byte[] target) Description copied from interface:ByteIterable
Converts the ByteIterable to a primitive byte 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 interfaceByteIterable
-
select
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.- Specified by:
select
in interfaceByteIterable
- Specified by:
select
in interfaceByteValuesMap
- Specified by:
select
in interfaceMutableByteValuesMap
-
reject
Description copied from interface:ByteIterable
Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.- Specified by:
reject
in interfaceByteIterable
- Specified by:
reject
in interfaceByteValuesMap
- Specified by:
reject
in interfaceMutableByteValuesMap
-
collect
Description copied from interface:ByteIterable
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 interfaceByteIterable
- Specified by:
collect
in interfaceByteValuesMap
- Specified by:
collect
in interfaceMutableByteValuesMap
-
detectIfNone
- Specified by:
detectIfNone
in interfaceByteIterable
-
count
Description copied from interface:ByteIterable
Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.- Specified by:
count
in interfaceByteIterable
-
anySatisfy
Description copied from interface:ByteIterable
Returns true if any of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceByteIterable
-
allSatisfy
Description copied from interface:ByteIterable
Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceByteIterable
-
chunk
Description copied from interface:ByteIterable
Partitions elements in fixed size chunks.- Specified by:
chunk
in interfaceByteIterable
- Parameters:
size
- the number of elements per chunk- Returns:
- A
RichIterable
containingByteIterable
s of sizesize
, except the last will be truncated if the elements don't divide evenly.
-
sum
public long sum()- Specified by:
sum
in interfaceByteIterable
-
containsValue
public boolean containsValue(byte value) Description copied from interface:ByteValuesMap
Returns whether or not this map contains the value.- Specified by:
containsValue
in interfaceByteValuesMap
- Parameters:
value
- the value to test- Returns:
- if this collection contains the value
-
forEachValue
Description copied from interface:ByteValuesMap
Iterates through each value in this map.- Specified by:
forEachValue
in interfaceByteValuesMap
- Parameters:
procedure
- the procedure to invoke for each value in this map.
-