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 Object implements LongIterable
This file was automatically generated from template file abstractPrimitiveIterable.stg.
- Since:
- 6.0
-
Constructor Summary
Constructors Constructor Description AbstractLongIterable()
-
Method Summary
Modifier and Type Method Description LazyLongIterable
asLazy()
Returns a LazyLongIterable adapter wrapping the source LongIterable.double
average()
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.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()
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
equals, 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, count, detectIfNone, each, flatCollect, forEach, injectInto, longIterator, max, medianIfEmpty, min, noneSatisfy, reduce, reduceIfEmpty, reject, reject, select, select, sum, summaryStatistics, tap, toArray, toArray
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size
-
Constructor Details
-
AbstractLongIterable
public AbstractLongIterable()
-
-
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:
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
- Specified by:
toSortedList
in interfaceLongIterable
-
asLazy
Description copied from interface:LongIterable
Returns a LazyLongIterable adapter wrapping the source LongIterable.- Specified by:
asLazy
in interfaceLongIterable
-
toList
Description copied from interface:LongIterable
Converts the LongIterable to a new MutableLongList.- Specified by:
toList
in interfaceLongIterable
-
toSet
Description copied from interface:LongIterable
Converts the LongIterable to a new MutableLongSet.- Specified by:
toSet
in interfaceLongIterable
-
toBag
Description copied from interface:LongIterable
Converts the LongIterable to a new MutableLongBag.- Specified by:
toBag
in interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)Description copied from interface:LongIterable
Returns true if the all of the values specified in the source array are contained in the LongIterable, and false if they are not.- Specified by:
containsAll
in interfaceLongIterable
-
containsAll
Description copied from interface:LongIterable
Returns true if the all of the values specified in the source LongIterable are contained in the LongIterable, and false if they are not.- Specified by:
containsAll
in interfaceLongIterable
-