Class LazyByteIterate
java.lang.Object
org.eclipse.collections.impl.utility.primitive.LazyByteIterate
public final class LazyByteIterate extends 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
-
Method Summary
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 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.
-
Method Details
-
adapt
Creates a deferred byte iterable for the specified byte iterable. -
select
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 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
-
tap
Creates a deferred tap iterable for the specified iterable.- Since:
- 9.0
-