Class AbstractIntIterable
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
- All Implemented Interfaces:
IntIterable
,PrimitiveIterable
- Direct Known Subclasses:
AbstractIntSet
,AbstractMutableIntValuesMap
,CodePointAdapter
,CodePointList
,IntArrayList
,IntHashBag
This file was automatically generated from template file abstractPrimitiveIterable.stg.
- Since:
- 6.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasLazy()
Returns a LazyIntIterable adapter wrapping the source IntIterable.double
average()
int
maxIfEmpty
(int defaultValue) double
median()
int
minIfEmpty
(int defaultValue) toBag()
Converts the IntIterable to a new MutableIntBag.toList()
Converts the IntIterable to a new MutableIntList.toSet()
Converts the IntIterable to a new MutableIntSet.int[]
toString()
Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.collections.api.IntIterable
allSatisfy, anySatisfy, averageIfEmpty, chunk, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, intIterator, max, medianIfEmpty, min, noneSatisfy, reduce, reduceIfEmpty, reject, reject, select, select, sum, summaryStatistics, tap, toArray, toArray, toSortedList, toSortedListBy, toSortedListBy
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Constructor Details
-
AbstractIntIterable
public AbstractIntIterable()
-
-
Method Details
-
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 classObject
- Returns:
- a string representation of this PrimitiveIterable
- See Also:
-
minIfEmpty
public int minIfEmpty(int defaultValue) - Specified by:
minIfEmpty
in interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue) - Specified by:
maxIfEmpty
in interfaceIntIterable
-
average
public double average()- Specified by:
average
in interfaceIntIterable
-
median
public double median()- Specified by:
median
in interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()- Specified by:
toSortedArray
in interfaceIntIterable
-
toSortedList
- Specified by:
toSortedList
in interfaceIntIterable
-
asLazy
Description copied from interface:IntIterable
Returns a LazyIntIterable adapter wrapping the source IntIterable.- Specified by:
asLazy
in interfaceIntIterable
-
toList
Description copied from interface:IntIterable
Converts the IntIterable to a new MutableIntList.- Specified by:
toList
in interfaceIntIterable
-
toSet
Description copied from interface:IntIterable
Converts the IntIterable to a new MutableIntSet.- Specified by:
toSet
in interfaceIntIterable
-
toBag
Description copied from interface:IntIterable
Converts the IntIterable to a new MutableIntBag.- Specified by:
toBag
in interfaceIntIterable
-