LazyLongIterable, LongIterable, PrimitiveIterablepublic class LazyLongIterableAdapter extends AbstractLazyLongIterable
| Constructor | Description |
|---|---|
LazyLongIterableAdapter(LongIterable delegate) |
| 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(Appendable appendable) |
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator) |
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
Prints a string representation of this collection onto the given
Appendable. |
double |
average() |
|
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) |
|
void |
each(LongProcedure procedure) |
A synonym for forEach.
|
<T> T |
injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function) |
|
boolean |
isEmpty() |
Returns true if this iterable has zero items.
|
LongIterator |
longIterator() |
Returns a primitive iterator that can be used to iterate over the LongIterable in an
imperative style.
|
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). |
String |
makeString(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). |
String |
makeString(String start,
String separator,
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 defaultValue) |
|
double |
median() |
|
long |
min() |
|
long |
minIfEmpty(long defaultValue) |
|
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()
|
int |
size() |
Returns the number of items in this iterable.
|
long |
sum() |
|
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() |
|
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, tapaverageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatisticspublic LazyLongIterableAdapter(LongIterable delegate)
public LongIterator longIterator()
LongIterablepublic void each(LongProcedure procedure)
LongIterablepublic int size()
PrimitiveIterablesize in interface PrimitiveIterablesize in class AbstractLazyLongIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterableisEmpty in class AbstractLazyLongIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablenotEmpty in class AbstractLazyLongIterablepublic int count(LongPredicate predicate)
LongIterablecount in interface LongIterablecount in class AbstractLazyLongIterablepublic boolean anySatisfy(LongPredicate predicate)
LongIterableanySatisfy in interface LongIterableanySatisfy in class AbstractLazyLongIterablepublic boolean allSatisfy(LongPredicate predicate)
LongIterableallSatisfy in interface LongIterableallSatisfy in class AbstractLazyLongIterablepublic boolean noneSatisfy(LongPredicate predicate)
LongIterablenoneSatisfy in interface LongIterablenoneSatisfy in class AbstractLazyLongIterablepublic long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone in interface LongIterabledetectIfNone in class AbstractLazyLongIterablepublic long sum()
sum in interface LongIterablesum in class AbstractLazyLongIterablepublic long max()
max in interface LongIterablemax in class AbstractLazyLongIterablepublic long min()
min in interface LongIterablemin in class AbstractLazyLongIterablepublic long minIfEmpty(long defaultValue)
minIfEmpty in interface LongIterableminIfEmpty in class AbstractLazyLongIterablepublic long maxIfEmpty(long defaultValue)
maxIfEmpty in interface LongIterablemaxIfEmpty in class AbstractLazyLongIterablepublic double average()
average in interface LongIterableaverage in class AbstractLazyLongIterablepublic double median()
median in interface LongIterablemedian in class AbstractLazyLongIterablepublic long[] toSortedArray()
toSortedArray in interface LongIterabletoSortedArray in class AbstractLazyLongIterablepublic MutableLongList toSortedList()
toSortedList in interface LongIterabletoSortedList in class AbstractLazyLongIterablepublic long[] toArray()
LongIterabletoArray in interface LongIterabletoArray in class AbstractLazyLongIterablepublic 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 AbstractLazyLongIterableAbstractCollection.toString()public String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablemakeString in class AbstractLazyLongIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablemakeString in class AbstractLazyLongIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablemakeString in class AbstractLazyLongIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterableappendString in class AbstractLazyLongIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterableappendString in class AbstractLazyLongIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterableappendString in class AbstractLazyLongIterablepublic boolean contains(long value)
LongIterablecontains in interface LongIterablecontains in class AbstractLazyLongIterablepublic boolean containsAll(long... source)
LongIterablecontainsAll in interface LongIterablecontainsAll in class AbstractLazyLongIterablepublic boolean containsAll(LongIterable source)
LongIterablecontainsAll in interface LongIterablecontainsAll in class AbstractLazyLongIterablepublic MutableLongList toList()
LongIterabletoList in interface LongIterabletoList in class AbstractLazyLongIterablepublic MutableLongSet toSet()
LongIterabletoSet in interface LongIterabletoSet in class AbstractLazyLongIterablepublic MutableLongBag toBag()
LongIterabletoBag in interface LongIterabletoBag in class AbstractLazyLongIterablepublic <T> T injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface LongIterableinjectInto in class AbstractLazyLongIterableCopyright © 2004–2019. All rights reserved.