Package com.complexible.common.collect
Class LongIterators
- java.lang.Object
-
- com.complexible.common.collect.LongIterators
-
public class LongIterators extends java.lang.Object
- Since:
- 3.0
- Author:
- Evren Sirin, Michael Grove
-
-
Constructor Summary
Constructors Constructor Description LongIterators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LongIterator
concat(LongIterator theFirst, LongIterator theSecond)
static SkippingLongIterator
emptyIterator()
static SkippingLongIterator
filtered(SkippingLongIterator base, java.util.function.LongPredicate predicate)
static SkippingLongIterator
forArray(long... theArray)
static SkippingLongIterator
forArray(long[] theArray, int theStart, int theEnd)
static SkippingLongIterator
forRange(long theInitialValue, long theFinalValue)
static <T> SkippingLongIterator
forSkippingIterator(SkippingIterator<T> theIterator, java.util.function.ToLongFunction<T> theObjectToLong, java.util.function.LongFunction<T> theLongToObject)
static <T> CloseableLongIterator
fromIterator(CloseableIterator<T> theIter, java.util.function.ToLongFunction<T> theFunc)
static ResettableLongIterator
singleton(long theValue)
static long
size(LongIterator theIter)
static <T> CloseableIterator<T>
toIterator(CloseableLongIterator theIter, java.util.function.LongFunction<T> theFunc)
static java.util.List<java.lang.Long>
toList(LongIterator theIter)
static CloseableLongIterator
uncloseable(CloseableLongIterator iterator)
-
-
-
Method Detail
-
concat
public static LongIterator concat(LongIterator theFirst, LongIterator theSecond)
-
emptyIterator
public static SkippingLongIterator emptyIterator()
-
singleton
public static ResettableLongIterator singleton(long theValue)
-
forArray
public static SkippingLongIterator forArray(long[] theArray, int theStart, int theEnd)
-
forArray
public static SkippingLongIterator forArray(long... theArray)
-
forRange
public static SkippingLongIterator forRange(long theInitialValue, long theFinalValue)
-
forSkippingIterator
public static <T> SkippingLongIterator forSkippingIterator(SkippingIterator<T> theIterator, java.util.function.ToLongFunction<T> theObjectToLong, java.util.function.LongFunction<T> theLongToObject)
-
toIterator
public static <T> CloseableIterator<T> toIterator(CloseableLongIterator theIter, java.util.function.LongFunction<T> theFunc)
-
fromIterator
public static <T> CloseableLongIterator fromIterator(CloseableIterator<T> theIter, java.util.function.ToLongFunction<T> theFunc)
-
size
public static long size(LongIterator theIter)
-
toList
public static java.util.List<java.lang.Long> toList(LongIterator theIter)
-
uncloseable
public static CloseableLongIterator uncloseable(CloseableLongIterator iterator)
-
filtered
public static SkippingLongIterator filtered(SkippingLongIterator base, java.util.function.LongPredicate predicate)
-
-