LazyShortIterable, PrimitiveIterable, ShortIterablepublic class LazyShortIterableAdapter extends AbstractLazyShortIterable
| Constructor | Description |
|---|---|
LazyShortIterableAdapter(ShortIterable delegate) |
| 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) |
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(java.lang.Appendable appendable,
java.lang.String separator) |
Prints a string representation of this collection onto the given
Appendable. |
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. |
double |
average() |
|
boolean |
contains(short value) |
Returns true if the value is contained in the ShortIterable, and false if it is not.
|
boolean |
containsAll(short... source) |
Returns true if the all of the values specified in the source array are contained
in the ShortIterable, and false if they are 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.
|
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 ifNone) |
|
void |
each(ShortProcedure procedure) |
A synonym for forEach.
|
<T> T |
injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function) |
|
boolean |
isEmpty() |
Returns true if this iterable has zero items.
|
java.lang.String |
makeString() |
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
java.lang.String |
makeString(java.lang.String separator) |
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
java.lang.String |
makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end) |
Returns a string representation of this collection with the elements separated by the specified
separator and enclosed between the start and end strings.
|
short |
max() |
|
short |
maxIfEmpty(short defaultValue) |
|
double |
median() |
|
short |
min() |
|
short |
minIfEmpty(short defaultValue) |
|
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()
|
ShortIterator |
shortIterator() |
Returns a primitive iterator that can be used to iterate over the ShortIterable in an
imperative style.
|
int |
size() |
Returns the number of items in this iterable.
|
long |
sum() |
|
short[] |
toArray() |
Converts the ShortIterable to a primitive short array.
|
MutableShortBag |
toBag() |
Converts the ShortIterable to a new MutableShortBag.
|
MutableShortList |
toList() |
Converts the ShortIterable to a new MutableShortList.
|
MutableShortSet |
toSet() |
Converts the ShortIterable to a new MutableShortSet.
|
short[] |
toSortedArray() |
|
MutableShortList |
toSortedList() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, forEach, reject, select, tapequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaverageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatisticspublic LazyShortIterableAdapter(ShortIterable delegate)
public ShortIterator shortIterator()
ShortIterablepublic void each(ShortProcedure procedure)
ShortIterablepublic int size()
PrimitiveIterablesize in interface PrimitiveIterablesize in class AbstractLazyShortIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterableisEmpty in class AbstractLazyShortIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablenotEmpty in class AbstractLazyShortIterablepublic int count(ShortPredicate predicate)
ShortIterablecount in interface ShortIterablecount in class AbstractLazyShortIterablepublic boolean anySatisfy(ShortPredicate predicate)
ShortIterableanySatisfy in interface ShortIterableanySatisfy in class AbstractLazyShortIterablepublic boolean allSatisfy(ShortPredicate predicate)
ShortIterableallSatisfy in interface ShortIterableallSatisfy in class AbstractLazyShortIterablepublic boolean noneSatisfy(ShortPredicate predicate)
ShortIterablenoneSatisfy in interface ShortIterablenoneSatisfy in class AbstractLazyShortIterablepublic short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterabledetectIfNone in class AbstractLazyShortIterablepublic long sum()
sum in interface ShortIterablesum in class AbstractLazyShortIterablepublic short max()
max in interface ShortIterablemax in class AbstractLazyShortIterablepublic short min()
min in interface ShortIterablemin in class AbstractLazyShortIterablepublic short minIfEmpty(short defaultValue)
minIfEmpty in interface ShortIterableminIfEmpty in class AbstractLazyShortIterablepublic short maxIfEmpty(short defaultValue)
maxIfEmpty in interface ShortIterablemaxIfEmpty in class AbstractLazyShortIterablepublic double average()
average in interface ShortIterableaverage in class AbstractLazyShortIterablepublic double median()
median in interface ShortIterablemedian in class AbstractLazyShortIterablepublic short[] toSortedArray()
toSortedArray in interface ShortIterabletoSortedArray in class AbstractLazyShortIterablepublic MutableShortList toSortedList()
toSortedList in interface ShortIterabletoSortedList in class AbstractLazyShortIterablepublic short[] toArray()
ShortIterabletoArray in interface ShortIterabletoArray in class AbstractLazyShortIterablepublic java.lang.String toString()
PrimitiveIterable
Assert.assertEquals("[]", IntLists.mutable.empty().toString());
Assert.assertEquals("[1]", IntLists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", IntLists.mutable.with(1, 2, 3).toString());
toString in interface PrimitiveIterabletoString in class AbstractLazyShortIterableAbstractCollection.toString()public java.lang.String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablemakeString in class AbstractLazyShortIterablepublic java.lang.String makeString(java.lang.String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablemakeString in class AbstractLazyShortIterablepublic java.lang.String makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
PrimitiveIterablemakeString in interface PrimitiveIterablemakeString in class AbstractLazyShortIterablepublic void appendString(java.lang.Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterableappendString in class AbstractLazyShortIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterableappendString in class AbstractLazyShortIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String start,
java.lang.String separator,
java.lang.String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterableappendString in class AbstractLazyShortIterablepublic boolean contains(short value)
ShortIterablecontains in interface ShortIterablecontains in class AbstractLazyShortIterablepublic boolean containsAll(short... source)
ShortIterablecontainsAll in interface ShortIterablecontainsAll in class AbstractLazyShortIterablepublic boolean containsAll(ShortIterable source)
ShortIterablecontainsAll in interface ShortIterablecontainsAll in class AbstractLazyShortIterablepublic MutableShortList toList()
ShortIterabletoList in interface ShortIterabletoList in class AbstractLazyShortIterablepublic MutableShortSet toSet()
ShortIterabletoSet in interface ShortIterabletoSet in class AbstractLazyShortIterablepublic MutableShortBag toBag()
ShortIterabletoBag in interface ShortIterabletoBag in class AbstractLazyShortIterablepublic <T> T injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterableinjectInto in class AbstractLazyShortIterableCopyright © 2004–2020. All rights reserved.