LazyLongIterable, LongIterable, PrimitiveIterableCollectBooleanToLongIterable, CollectByteToLongIterable, CollectCharToLongIterable, CollectDoubleToLongIterable, CollectFloatToLongIterable, CollectIntToLongIterable, CollectLongIterable, CollectLongToLongIterable, CollectShortToLongIterable, LazyLongIterableAdapter, ReverseLongIterable, SelectLongIterable, TapLongIterablepublic abstract class AbstractLazyLongIterable extends java.lang.Object implements LazyLongIterable
| Constructor | Description |
|---|---|
AbstractLazyLongIterable() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
allSatisfy(LongPredicate predicate) |
Returns true if all of the elements in the LongIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(LongPredicate predicate) |
Returns true if any of the elements in the LongIterable 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. |
LazyLongIterable |
asLazy() |
Returns a LazyLongIterable adapter wrapping the source LongIterable.
|
double |
average() |
|
RichIterable<LongIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
<V> LazyIterable<V> |
collect(LongToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
LazyBooleanIterable |
collectBoolean(LongToBooleanFunction function) |
|
LazyByteIterable |
collectByte(LongToByteFunction function) |
|
LazyCharIterable |
collectChar(LongToCharFunction function) |
|
LazyDoubleIterable |
collectDouble(LongToDoubleFunction function) |
|
LazyFloatIterable |
collectFloat(LongToFloatFunction function) |
|
LazyIntIterable |
collectInt(LongToIntFunction function) |
|
LazyLongIterable |
collectLong(LongToLongFunction function) |
|
LazyShortIterable |
collectShort(LongToShortFunction function) |
|
boolean |
contains(long value) |
Returns true if the value is contained in the LongIterable, and false if it is not.
|
boolean |
containsAll(long... source) |
Returns true if the all of the values specified in the source array are contained
in the LongIterable, and false if they are not.
|
boolean |
containsAll(LongIterable source) |
Returns true if the all of the values specified in the source LongIterable are contained
in the LongIterable, and false if they are not.
|
int |
count(LongPredicate predicate) |
Returns a count of the number of elements in the LongIterable that return true for the
specified predicate.
|
long |
detectIfNone(LongPredicate predicate,
long ifNone) |
|
<V> LazyIterable<V> |
flatCollect(LongToObjectFunction<? extends java.lang.Iterable<V>> function) |
|
void |
forEach(LongProcedure procedure) |
Applies the LongProcedure to each element in the LongIterable.
|
<T> T |
injectInto(T injectedValue,
ObjectLongToObjectFunction<? 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.
|
long |
max() |
|
long |
maxIfEmpty(long ifEmpty) |
|
double |
median() |
|
long |
min() |
|
long |
minIfEmpty(long ifEmpty) |
|
boolean |
noneSatisfy(LongPredicate predicate) |
Returns true if none of the elements in the LongIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
notEmpty() |
The English equivalent of !this.isEmpty()
|
LazyLongIterable |
reject(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return false for the specified predicate.
|
LazyLongIterable |
select(LongPredicate predicate) |
Returns a new LongIterable with all of the elements in the LongIterable that
return true for the specified predicate.
|
int |
size() |
Returns the number of items in this iterable.
|
long |
sum() |
|
LazyLongIterable |
tap(LongProcedure procedure) |
|
long[] |
toArray() |
Converts the LongIterable to a primitive long array.
|
MutableLongBag |
toBag() |
Converts the LongIterable to a new MutableLongBag.
|
MutableLongList |
toList() |
Converts the LongIterable to a new MutableLongList.
|
MutableLongSet |
toSet() |
Converts the LongIterable to a new MutableLongSet.
|
long[] |
toSortedArray() |
|
MutableLongList |
toSortedList() |
|
java.lang.String |
toString() |
Returns a string with the elements of this iterable separated by commas with spaces and
enclosed in square brackets.
|
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, each, flatCollect, longIterator, medianIfEmpty, reject, select, summaryStatisticspublic void forEach(LongProcedure procedure)
LongIterableforEach in interface LongIterablepublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic 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 java.lang.ObjectAbstractCollection.toString()public boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic java.lang.String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic 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 PrimitiveIterablepublic java.lang.String makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(java.lang.Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(java.lang.Appendable appendable,
java.lang.String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic 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 PrimitiveIterablepublic boolean contains(long value)
LongIterablecontains in interface LongIterablepublic boolean containsAll(long... source)
LongIterablecontainsAll in interface LongIterablepublic boolean containsAll(LongIterable source)
LongIterablecontainsAll in interface LongIterablepublic LazyLongIterable select(LongPredicate predicate)
LongIterableselect in interface LazyLongIterableselect in interface LongIterablepublic LazyLongIterable reject(LongPredicate predicate)
LongIterablereject in interface LazyLongIterablereject in interface LongIterablepublic LazyLongIterable tap(LongProcedure procedure)
tap in interface LazyLongIterabletap in interface LongIterablepublic <V> LazyIterable<V> collect(LongToObjectFunction<? extends V> function)
LongIterablecollect in interface LazyLongIterablecollect in interface LongIterablepublic <V> LazyIterable<V> flatCollect(LongToObjectFunction<? extends java.lang.Iterable<V>> function)
flatCollect in interface LazyLongIterablepublic LazyBooleanIterable collectBoolean(LongToBooleanFunction function)
collectBoolean in interface LazyLongIterablepublic LazyByteIterable collectByte(LongToByteFunction function)
collectByte in interface LazyLongIterablepublic LazyCharIterable collectChar(LongToCharFunction function)
collectChar in interface LazyLongIterablepublic LazyShortIterable collectShort(LongToShortFunction function)
collectShort in interface LazyLongIterablepublic LazyIntIterable collectInt(LongToIntFunction function)
collectInt in interface LazyLongIterablepublic LazyFloatIterable collectFloat(LongToFloatFunction function)
collectFloat in interface LazyLongIterablepublic LazyLongIterable collectLong(LongToLongFunction function)
collectLong in interface LazyLongIterablepublic LazyDoubleIterable collectDouble(LongToDoubleFunction function)
collectDouble in interface LazyLongIterablepublic long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone in interface LongIterablepublic int count(LongPredicate predicate)
LongIterablecount in interface LongIterablepublic boolean anySatisfy(LongPredicate predicate)
LongIterableanySatisfy in interface LongIterablepublic boolean allSatisfy(LongPredicate predicate)
LongIterableallSatisfy in interface LongIterablepublic boolean noneSatisfy(LongPredicate predicate)
LongIterablenoneSatisfy in interface LongIterablepublic <T> T injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface LongIterablepublic RichIterable<LongIterable> chunk(int size)
LongIterablechunk in interface LongIterablesize - the number of elements per chunkRichIterable containing LongIterables of size size, except the last will be
truncated if the elements don't divide evenly.public long[] toArray()
LongIterabletoArray in interface LongIterablepublic MutableLongList toList()
LongIterabletoList in interface LongIterablepublic MutableLongSet toSet()
LongIterabletoSet in interface LongIterablepublic MutableLongBag toBag()
LongIterabletoBag in interface LongIterablepublic long sum()
sum in interface LongIterablepublic long max()
max in interface LongIterablepublic long maxIfEmpty(long ifEmpty)
maxIfEmpty in interface LongIterablepublic long min()
min in interface LongIterablepublic long minIfEmpty(long ifEmpty)
minIfEmpty in interface LongIterablepublic double average()
average in interface LongIterablepublic double median()
median in interface LongIterablepublic long[] toSortedArray()
toSortedArray in interface LongIterablepublic MutableLongList toSortedList()
toSortedList in interface LongIterablepublic LazyLongIterable asLazy()
LongIterableasLazy in interface LongIterableCopyright © 2004–2018. All rights reserved.