MutableShortValuesMap
, ShortValuesMap
, PrimitiveIterable
, ShortIterable
ByteShortHashMap
, CharShortHashMap
, DoubleShortHashMap
, FloatShortHashMap
, IntShortHashMap
, LongShortHashMap
, ShortShortHashMap
public abstract class AbstractMutableShortValuesMap extends AbstractShortIterable implements MutableShortValuesMap
Constructor | Description |
---|---|
AbstractMutableShortValuesMap() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
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(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end) |
Prints a string representation of this collection onto the given
Appendable . |
RichIterable<ShortIterable> |
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 the all of the values specified in the source ShortIterable are contained
in the ShortIterable, and false if they are not.
|
boolean |
containsValue(short 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 |
forEach(ShortProcedure procedure) |
Applies the ShortProcedure to each element in the ShortIterable.
|
void |
forEachValue(ShortProcedure procedure) |
|
boolean |
isEmpty() |
Returns true if this iterable has zero items.
|
short |
max() |
|
short |
min() |
|
boolean |
noneSatisfy(ShortPredicate predicate) |
Returns true if none of the elements in the ShortIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
notEmpty() |
The English equivalent of !this.isEmpty()
|
MutableShortBag |
reject(ShortPredicate predicate) |
Returns a new ShortIterable with all of the elements in the ShortIterable that
return false for the specified predicate.
|
MutableShortBag |
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.
|
asLazy, average, containsAll, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
clear, shortIterator
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
appendString, appendString, makeString, makeString, makeString, toString
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, flatCollect, injectInto, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList
tap, values
public boolean contains(short value)
ShortIterable
contains
in interface ShortIterable
public boolean containsAll(ShortIterable source)
ShortIterable
containsAll
in interface ShortIterable
containsAll
in class AbstractShortIterable
public short max()
max
in interface ShortIterable
public short min()
min
in interface ShortIterable
public int size()
PrimitiveIterable
size
in interface PrimitiveIterable
public boolean isEmpty()
PrimitiveIterable
isEmpty
in interface PrimitiveIterable
public boolean notEmpty()
PrimitiveIterable
notEmpty
in interface PrimitiveIterable
public void forEach(ShortProcedure procedure)
ShortIterable
forEach
in interface ShortIterable
public void each(ShortProcedure procedure)
ShortIterable
each
in interface ShortIterable
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)
PrimitiveIterable
Appendable
. Prints the string returned
by PrimitiveIterable.makeString(String, String, String)
.appendString
in interface PrimitiveIterable
public short[] toArray()
ShortIterable
toArray
in interface ShortIterable
public MutableShortBag select(ShortPredicate predicate)
ShortIterable
select
in interface MutableShortValuesMap
select
in interface ShortIterable
select
in interface ShortValuesMap
public MutableShortBag reject(ShortPredicate predicate)
ShortIterable
reject
in interface MutableShortValuesMap
reject
in interface ShortIterable
reject
in interface ShortValuesMap
public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
ShortIterable
collect
in interface MutableShortValuesMap
collect
in interface ShortIterable
collect
in interface ShortValuesMap
public short detectIfNone(ShortPredicate predicate, short value)
detectIfNone
in interface ShortIterable
public int count(ShortPredicate predicate)
ShortIterable
count
in interface ShortIterable
public boolean anySatisfy(ShortPredicate predicate)
ShortIterable
anySatisfy
in interface ShortIterable
public boolean allSatisfy(ShortPredicate predicate)
ShortIterable
allSatisfy
in interface ShortIterable
public boolean noneSatisfy(ShortPredicate predicate)
ShortIterable
noneSatisfy
in interface ShortIterable
public RichIterable<ShortIterable> chunk(int size)
ShortIterable
chunk
in interface ShortIterable
size
- the number of elements per chunkRichIterable
containing ShortIterable
s of size size
, except the last will be
truncated if the elements don't divide evenly.public long sum()
sum
in interface ShortIterable
public boolean containsValue(short value)
containsValue
in interface ShortValuesMap
public void forEachValue(ShortProcedure procedure)
forEachValue
in interface ShortValuesMap
Copyright © 2004–2018. All rights reserved.