public class IntIterators extends Object
Modifier and Type | Field and Description |
---|---|
static PrimitiveIterator.OfInt |
EMPTY |
Constructor and Description |
---|
IntIterators() |
Modifier and Type | Method and Description |
---|---|
static boolean |
equals(PrimitiveIterator.OfInt a,
PrimitiveIterator.OfInt b) |
static PrimitiveIterator.OfInt |
filter(PrimitiveIterator.OfInt it,
IntPredicate f) |
static <U> PrimitiveIterator.OfInt |
flatMap(Iterator<U> it,
Function<U,PrimitiveIterator.OfInt> f) |
static PrimitiveIterator.OfInt |
from(BitSet bitSet) |
static PrimitiveIterator.OfInt |
map(PrimitiveIterator.OfInt it,
IntUnaryOperator f) |
static PrimitiveIterator.OfInt |
range(long min,
long max,
LongToIntFunction f) |
static PrimitiveIterator.OfInt |
range(long max,
LongToIntFunction f)
Represents a range implicitly starting at 0.
|
static IntStream |
toStream(PrimitiveIterator.OfInt it,
long estimatedSize) |
public static final PrimitiveIterator.OfInt EMPTY
public static boolean equals(PrimitiveIterator.OfInt a, PrimitiveIterator.OfInt b)
public static PrimitiveIterator.OfInt from(BitSet bitSet)
public static PrimitiveIterator.OfInt filter(PrimitiveIterator.OfInt it, IntPredicate f)
it
- an iteratorf
- a predicatepublic static PrimitiveIterator.OfInt map(PrimitiveIterator.OfInt it, IntUnaryOperator f)
it
- an iteratorf
- a function which transforms valuespublic static <U> PrimitiveIterator.OfInt flatMap(Iterator<U> it, Function<U,PrimitiveIterator.OfInt> f)
it
- an iteratorf
- a function which transforms values into iteratorspublic static PrimitiveIterator.OfInt range(long min, long max, LongToIntFunction f)
min
- an inclusive start of the rangemax
- an exclusive end of the rangef
- a function which transforms a number in the range into a valuef
public static PrimitiveIterator.OfInt range(long max, LongToIntFunction f)
max
- an exclusive end of the range.f
- a function which transforms a number in the range into a value.f
public static IntStream toStream(PrimitiveIterator.OfInt it, long estimatedSize)