IntIterable, LazyIntIterable, PrimitiveIterablepublic class LazyIntIterableAdapter extends AbstractLazyIntIterable
| Constructor | Description |
|---|---|
LazyIntIterableAdapter(IntIterable delegate) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
allSatisfy(IntPredicate predicate) |
Returns true if all of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(IntPredicate predicate) |
Returns true if any of the elements in the IntIterable 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(int value) |
Returns true if the value is contained in the IntIterable, and false if it is not.
|
boolean |
containsAll(int... source) |
Returns true if the all of the values specified in the source array are contained
in the IntIterable, and false if they are not.
|
boolean |
containsAll(IntIterable source) |
Returns true if the all of the values specified in the source IntIterable are contained
in the IntIterable, and false if they are not.
|
int |
count(IntPredicate predicate) |
Returns a count of the number of elements in the IntIterable that return true for the
specified predicate.
|
int |
detectIfNone(IntPredicate predicate,
int ifNone) |
|
void |
each(IntProcedure procedure) |
A synonym for forEach.
|
<T> T |
injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function) |
|
IntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
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.
|
int |
max() |
|
int |
maxIfEmpty(int defaultValue) |
|
double |
median() |
|
int |
min() |
|
int |
minIfEmpty(int defaultValue) |
|
boolean |
noneSatisfy(IntPredicate predicate) |
Returns true if none of the elements in the IntIterable 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() |
|
int[] |
toArray() |
Converts the IntIterable to a primitive int array.
|
MutableIntBag |
toBag() |
Converts the IntIterable to a new MutableIntBag.
|
MutableIntList |
toList() |
Converts the IntIterable to a new MutableIntList.
|
MutableIntSet |
toSet() |
Converts the IntIterable to a new MutableIntSet.
|
int[] |
toSortedArray() |
|
MutableIntList |
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, tapaverageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatisticspublic LazyIntIterableAdapter(IntIterable delegate)
public IntIterator intIterator()
IntIterablepublic void each(IntProcedure procedure)
IntIterablepublic int size()
PrimitiveIterablesize in interface PrimitiveIterablesize in class AbstractLazyIntIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterableisEmpty in class AbstractLazyIntIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablenotEmpty in class AbstractLazyIntIterablepublic int count(IntPredicate predicate)
IntIterablecount in interface IntIterablecount in class AbstractLazyIntIterablepublic boolean anySatisfy(IntPredicate predicate)
IntIterableanySatisfy in interface IntIterableanySatisfy in class AbstractLazyIntIterablepublic boolean allSatisfy(IntPredicate predicate)
IntIterableallSatisfy in interface IntIterableallSatisfy in class AbstractLazyIntIterablepublic boolean noneSatisfy(IntPredicate predicate)
IntIterablenoneSatisfy in interface IntIterablenoneSatisfy in class AbstractLazyIntIterablepublic int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone in interface IntIterabledetectIfNone in class AbstractLazyIntIterablepublic long sum()
sum in interface IntIterablesum in class AbstractLazyIntIterablepublic int max()
max in interface IntIterablemax in class AbstractLazyIntIterablepublic int min()
min in interface IntIterablemin in class AbstractLazyIntIterablepublic int minIfEmpty(int defaultValue)
minIfEmpty in interface IntIterableminIfEmpty in class AbstractLazyIntIterablepublic int maxIfEmpty(int defaultValue)
maxIfEmpty in interface IntIterablemaxIfEmpty in class AbstractLazyIntIterablepublic double average()
average in interface IntIterableaverage in class AbstractLazyIntIterablepublic double median()
median in interface IntIterablemedian in class AbstractLazyIntIterablepublic int[] toSortedArray()
toSortedArray in interface IntIterabletoSortedArray in class AbstractLazyIntIterablepublic MutableIntList toSortedList()
toSortedList in interface IntIterabletoSortedList in class AbstractLazyIntIterablepublic int[] toArray()
IntIterabletoArray in interface IntIterabletoArray in class AbstractLazyIntIterablepublic 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 AbstractLazyIntIterableAbstractCollection.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 AbstractLazyIntIterablepublic 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 AbstractLazyIntIterablepublic java.lang.String makeString(java.lang.String start,
java.lang.String separator,
java.lang.String end)
PrimitiveIterablemakeString in interface PrimitiveIterablemakeString in class AbstractLazyIntIterablepublic void appendString(java.lang.Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterableappendString in class AbstractLazyIntIterablepublic 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 AbstractLazyIntIterablepublic 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 AbstractLazyIntIterablepublic boolean contains(int value)
IntIterablecontains in interface IntIterablecontains in class AbstractLazyIntIterablepublic boolean containsAll(int... source)
IntIterablecontainsAll in interface IntIterablecontainsAll in class AbstractLazyIntIterablepublic boolean containsAll(IntIterable source)
IntIterablecontainsAll in interface IntIterablecontainsAll in class AbstractLazyIntIterablepublic MutableIntList toList()
IntIterabletoList in interface IntIterabletoList in class AbstractLazyIntIterablepublic MutableIntSet toSet()
IntIterabletoSet in interface IntIterabletoSet in class AbstractLazyIntIterablepublic MutableIntBag toBag()
IntIterabletoBag in interface IntIterabletoBag in class AbstractLazyIntIterablepublic <T> T injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface IntIterableinjectInto in class AbstractLazyIntIterableCopyright © 2004–2020. All rights reserved.