Class LazyIntIterableAdapter
java.lang.Object
org.eclipse.collections.impl.lazy.primitive.AbstractLazyIntIterable
org.eclipse.collections.impl.lazy.primitive.LazyIntIterableAdapter
- All Implemented Interfaces:
IntIterable
,LazyIntIterable
,PrimitiveIterable
public class LazyIntIterableAdapter extends AbstractLazyIntIterable
This file was automatically generated from template file lazyPrimitiveIterableAdapter.stg.
- Since:
- 3.0
-
Constructor Summary
Constructors Constructor Description LazyIntIterableAdapter(IntIterable delegate)
-
Method Summary
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(Appendable appendable)
Prints a string representation of this collection onto the givenAppendable
.void
appendString(Appendable appendable, String separator)
Prints a string representation of this collection onto the givenAppendable
.void
appendString(Appendable appendable, String start, String separator, String end)
Prints a string representation of this collection onto the givenAppendable
.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.String
makeString()
Returns a string representation of this collection by delegating toPrimitiveIterable.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 toPrimitiveIterable.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.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()
String
toString()
Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.Methods inherited from class org.eclipse.collections.impl.lazy.primitive.AbstractLazyIntIterable
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, forEach, reject, select, tap
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.IntIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toArray
-
Constructor Details
-
Method Details
-
intIterator
Description copied from interface:IntIterable
Returns a primitive iterator that can be used to iterate over the IntIterable in an imperative style. -
each
Description copied from interface:IntIterable
A synonym for forEach.- Since:
- 7.0.
-
size
public int size()Description copied from interface:PrimitiveIterable
Returns the number of items in this iterable.- Specified by:
size
in interfacePrimitiveIterable
- Overrides:
size
in classAbstractLazyIntIterable
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveIterable
Returns true if this iterable has zero items.- Specified by:
isEmpty
in interfacePrimitiveIterable
- Overrides:
isEmpty
in classAbstractLazyIntIterable
-
notEmpty
public boolean notEmpty()Description copied from interface:PrimitiveIterable
The English equivalent of !this.isEmpty()- Specified by:
notEmpty
in interfacePrimitiveIterable
- Overrides:
notEmpty
in classAbstractLazyIntIterable
-
count
Description copied from interface:IntIterable
Returns a count of the number of elements in the IntIterable that return true for the specified predicate.- Specified by:
count
in interfaceIntIterable
- Overrides:
count
in classAbstractLazyIntIterable
-
anySatisfy
Description copied from interface:IntIterable
Returns true if any of the elements in the IntIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfy
in interfaceIntIterable
- Overrides:
anySatisfy
in classAbstractLazyIntIterable
-
allSatisfy
Description copied from interface:IntIterable
Returns true if all of the elements in the IntIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfy
in interfaceIntIterable
- Overrides:
allSatisfy
in classAbstractLazyIntIterable
-
noneSatisfy
Description copied from interface:IntIterable
Returns true if none of the elements in the IntIterable return true for the specified predicate, otherwise returns false.- Specified by:
noneSatisfy
in interfaceIntIterable
- Overrides:
noneSatisfy
in classAbstractLazyIntIterable
-
detectIfNone
- Specified by:
detectIfNone
in interfaceIntIterable
- Overrides:
detectIfNone
in classAbstractLazyIntIterable
-
sum
public long sum()- Specified by:
sum
in interfaceIntIterable
- Overrides:
sum
in classAbstractLazyIntIterable
-
max
public int max()- Specified by:
max
in interfaceIntIterable
- Overrides:
max
in classAbstractLazyIntIterable
-
min
public int min()- Specified by:
min
in interfaceIntIterable
- Overrides:
min
in classAbstractLazyIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue)- Specified by:
minIfEmpty
in interfaceIntIterable
- Overrides:
minIfEmpty
in classAbstractLazyIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue)- Specified by:
maxIfEmpty
in interfaceIntIterable
- Overrides:
maxIfEmpty
in classAbstractLazyIntIterable
-
average
public double average()- Specified by:
average
in interfaceIntIterable
- Overrides:
average
in classAbstractLazyIntIterable
-
median
public double median()- Specified by:
median
in interfaceIntIterable
- Overrides:
median
in classAbstractLazyIntIterable
-
toSortedArray
public int[] toSortedArray()- Specified by:
toSortedArray
in interfaceIntIterable
- Overrides:
toSortedArray
in classAbstractLazyIntIterable
-
toSortedList
- Specified by:
toSortedList
in interfaceIntIterable
- Overrides:
toSortedList
in classAbstractLazyIntIterable
-
toArray
public int[] toArray()Description copied from interface:IntIterable
Converts the IntIterable to a primitive int array.- Specified by:
toArray
in interfaceIntIterable
- Overrides:
toArray
in classAbstractLazyIntIterable
-
toString
Description copied from interface:PrimitiveIterable
Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.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());
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classAbstractLazyIntIterable
- Returns:
- a string representation of this PrimitiveIterable
- See Also:
AbstractCollection.toString()
-
makeString
Description copied from interface:PrimitiveIterable
Returns a string representation of this collection by delegating toPrimitiveIterable.makeString(String)
and defaulting the separator parameter to the characters", "
(comma and space).- Specified by:
makeString
in interfacePrimitiveIterable
- Overrides:
makeString
in classAbstractLazyIntIterable
- Returns:
- a string representation of this collection.
-
makeString
Description copied from interface:PrimitiveIterable
Returns a string representation of this collection by delegating toPrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to""
(the empty String).- Specified by:
makeString
in interfacePrimitiveIterable
- Overrides:
makeString
in classAbstractLazyIntIterable
- Returns:
- a string representation of this collection.
-
makeString
Description copied from interface:PrimitiveIterable
Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.- Specified by:
makeString
in interfacePrimitiveIterable
- Overrides:
makeString
in classAbstractLazyIntIterable
- Returns:
- a string representation of this collection.
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString()
.- Specified by:
appendString
in interfacePrimitiveIterable
- Overrides:
appendString
in classAbstractLazyIntIterable
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String)
.- Specified by:
appendString
in interfacePrimitiveIterable
- Overrides:
appendString
in classAbstractLazyIntIterable
-
appendString
Description copied from interface:PrimitiveIterable
Prints a string representation of this collection onto the givenAppendable
. Prints the string returned byPrimitiveIterable.makeString(String, String, String)
.- Specified by:
appendString
in interfacePrimitiveIterable
- Overrides:
appendString
in classAbstractLazyIntIterable
-
contains
public boolean contains(int value)Description copied from interface:IntIterable
Returns true if the value is contained in the IntIterable, and false if it is not.- Specified by:
contains
in interfaceIntIterable
- Overrides:
contains
in classAbstractLazyIntIterable
-
containsAll
public boolean containsAll(int... source)Description copied from interface:IntIterable
Returns true if the all of the values specified in the source array are contained in the IntIterable, and false if they are not.- Specified by:
containsAll
in interfaceIntIterable
- Overrides:
containsAll
in classAbstractLazyIntIterable
-
containsAll
Description copied from interface:IntIterable
Returns true if the all of the values specified in the source IntIterable are contained in the IntIterable, and false if they are not.- Specified by:
containsAll
in interfaceIntIterable
- Overrides:
containsAll
in classAbstractLazyIntIterable
-
toList
Description copied from interface:IntIterable
Converts the IntIterable to a new MutableIntList.- Specified by:
toList
in interfaceIntIterable
- Overrides:
toList
in classAbstractLazyIntIterable
-
toSet
Description copied from interface:IntIterable
Converts the IntIterable to a new MutableIntSet.- Specified by:
toSet
in interfaceIntIterable
- Overrides:
toSet
in classAbstractLazyIntIterable
-
toBag
Description copied from interface:IntIterable
Converts the IntIterable to a new MutableIntBag.- Specified by:
toBag
in interfaceIntIterable
- Overrides:
toBag
in classAbstractLazyIntIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectIntToObjectFunction<? super T,? extends T> function)- Specified by:
injectInto
in interfaceIntIterable
- Overrides:
injectInto
in classAbstractLazyIntIterable
-