Class LazyByteIterate
- java.lang.Object
-
- org.eclipse.collections.impl.utility.primitive.LazyByteIterate
-
public final class LazyByteIterate extends java.lang.Object
LazyByteIterate is a factory class which creates "deferred" byte iterables around the specified byte iterables. A "deferred" byte iterable performs some operation, such as filtering or transforming, when the result byte iterable is iterated over. This makes the operation very memory efficient, because you don't have to create intermediate collections during the operation. This file was automatically generated from template file lazyPrimitiveIterate.stg.- Since:
- 5.0
-
-
Field Summary
Fields Modifier and Type Field Description private static LazyByteIterable
EMPTY_ITERABLE
-
Constructor Summary
Constructors Modifier Constructor Description private
LazyByteIterate()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LazyByteIterable
adapt(ByteIterable iterable)
Creates a deferred byte iterable for the specified byte iterable.static <V> LazyIterable<V>
collect(ByteIterable iterable, ByteToObjectFunction<? extends V> function)
Creates a deferred transforming byte iterable for the specified byte iterable.static <V> LazyIterable<V>
collectIf(ByteIterable iterable, BytePredicate predicate, ByteToObjectFunction<? extends V> function)
Creates a deferred filtering and transforming byte iterable for the specified byte iterable.static LazyByteIterable
empty()
static <V> LazyIterable<V>
flatCollect(ByteIterable iterable, ByteToObjectFunction<? extends java.lang.Iterable<V>> function)
Creates a deferred transforming and flattening byte iterable for the specified byte iterable.static LazyByteIterable
select(ByteIterable iterable, BytePredicate predicate)
Creates a deferred filtering byte iterable for the specified byte iterable.static LazyByteIterable
tap(ByteIterable iterable, ByteProcedure procedure)
Creates a deferred tap iterable for the specified iterable.
-
-
-
Field Detail
-
EMPTY_ITERABLE
private static final LazyByteIterable EMPTY_ITERABLE
-
-
Method Detail
-
adapt
public static LazyByteIterable adapt(ByteIterable iterable)
Creates a deferred byte iterable for the specified byte iterable.
-
select
public static LazyByteIterable select(ByteIterable iterable, BytePredicate predicate)
Creates a deferred filtering byte iterable for the specified byte iterable.
-
collect
public static <V> LazyIterable<V> collect(ByteIterable iterable, ByteToObjectFunction<? extends V> function)
Creates a deferred transforming byte iterable for the specified byte iterable.
-
flatCollect
public static <V> LazyIterable<V> flatCollect(ByteIterable iterable, ByteToObjectFunction<? extends java.lang.Iterable<V>> function)
Creates a deferred transforming and flattening byte iterable for the specified byte iterable.- Since:
- 9.0
-
collectIf
public static <V> LazyIterable<V> collectIf(ByteIterable iterable, BytePredicate predicate, ByteToObjectFunction<? extends V> function)
Creates a deferred filtering and transforming byte iterable for the specified byte iterable.
-
empty
public static LazyByteIterable empty()
-
tap
public static LazyByteIterable tap(ByteIterable iterable, ByteProcedure procedure)
Creates a deferred tap iterable for the specified iterable.- Since:
- 9.0
-
-