Class LazyShortIterate
java.lang.Object
org.eclipse.collections.impl.utility.primitive.LazyShortIterate
LazyShortIterate is a factory class which creates "deferred" short iterables around the specified short iterables. A "deferred"
short iterable performs some operation, such as filtering or transforming, when the result short 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 TypeMethodDescriptionstatic LazyShortIterable
adapt
(ShortIterable iterable) Creates a deferred short iterable for the specified short iterable.static <V> LazyIterable<V>
collect
(ShortIterable iterable, ShortToObjectFunction<? extends V> function) Creates a deferred transforming short iterable for the specified short iterable.static <V> LazyIterable<V>
collectIf
(ShortIterable iterable, ShortPredicate predicate, ShortToObjectFunction<? extends V> function) Creates a deferred filtering and transforming short iterable for the specified short iterable.static LazyShortIterable
empty()
static <V> LazyIterable<V>
flatCollect
(ShortIterable iterable, ShortToObjectFunction<? extends Iterable<V>> function) Creates a deferred transforming and flattening short iterable for the specified short iterable.static LazyShortIterable
select
(ShortIterable iterable, ShortPredicate predicate) Creates a deferred filtering short iterable for the specified short iterable.static LazyShortIterable
tap
(ShortIterable iterable, ShortProcedure procedure) Creates a deferred tap iterable for the specified iterable.
-
Method Details
-
adapt
Creates a deferred short iterable for the specified short iterable. -
select
Creates a deferred filtering short iterable for the specified short iterable. -
collect
public static <V> LazyIterable<V> collect(ShortIterable iterable, ShortToObjectFunction<? extends V> function) Creates a deferred transforming short iterable for the specified short iterable. -
flatCollect
public static <V> LazyIterable<V> flatCollect(ShortIterable iterable, ShortToObjectFunction<? extends Iterable<V>> function) Creates a deferred transforming and flattening short iterable for the specified short iterable.- Since:
- 9.0
-
collectIf
public static <V> LazyIterable<V> collectIf(ShortIterable iterable, ShortPredicate predicate, ShortToObjectFunction<? extends V> function) Creates a deferred filtering and transforming short iterable for the specified short iterable. -
empty
-
tap
Creates a deferred tap iterable for the specified iterable.- Since:
- 9.0
-