Class AbstractLongIterable
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractLongIterable
-
- All Implemented Interfaces:
LongIterable
,PrimitiveIterable
- Direct Known Subclasses:
AbstractLongSet
,AbstractMutableLongValuesMap
,LongArrayList
,LongHashBag
public abstract class AbstractLongIterable extends java.lang.Object implements LongIterable
This file was automatically generated from template file abstractPrimitiveIterable.stg.- Since:
- 6.0
-
-
Constructor Summary
Constructors Constructor Description AbstractLongIterable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LazyLongIterable
asLazy()
Returns a LazyLongIterable adapter wrapping the source LongIterable.double
average()
long
maxIfEmpty(long defaultValue)
double
median()
long
minIfEmpty(long defaultValue)
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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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, longIterator, 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
-
-
-
-
Method Detail
-
toString
public java.lang.String 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 classjava.lang.Object
- Returns:
- a string representation of this PrimitiveIterable
- See Also:
AbstractCollection.toString()
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmpty
in interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmpty
in interfaceLongIterable
-
average
public double average()
- Specified by:
average
in interfaceLongIterable
-
median
public double median()
- Specified by:
median
in interfaceLongIterable
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArray
in interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedList
in interfaceLongIterable
-
asLazy
public LazyLongIterable asLazy()
Description copied from interface:LongIterable
Returns a LazyLongIterable adapter wrapping the source LongIterable.- Specified by:
asLazy
in interfaceLongIterable
-
toList
public MutableLongList toList()
Description copied from interface:LongIterable
Converts the LongIterable to a new MutableLongList.- Specified by:
toList
in interfaceLongIterable
-
toSet
public MutableLongSet toSet()
Description copied from interface:LongIterable
Converts the LongIterable to a new MutableLongSet.- Specified by:
toSet
in interfaceLongIterable
-
toBag
public MutableLongBag toBag()
Description copied from interface:LongIterable
Converts the LongIterable to a new MutableLongBag.- Specified by:
toBag
in interfaceLongIterable
-
-