Class LazyShortIterate
- java.lang.Object
-
- org.eclipse.collections.impl.utility.primitive.LazyShortIterate
-
public final class LazyShortIterate extends java.lang.Object
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
-
-
Field Summary
Fields Modifier and Type Field Description private static LazyShortIterable
EMPTY_ITERABLE
-
Constructor Summary
Constructors Modifier Constructor Description private
LazyShortIterate()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 java.lang.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.
-
-
-
Field Detail
-
EMPTY_ITERABLE
private static final LazyShortIterable EMPTY_ITERABLE
-
-
Method Detail
-
adapt
public static LazyShortIterable adapt(ShortIterable iterable)
Creates a deferred short iterable for the specified short iterable.
-
select
public static LazyShortIterable select(ShortIterable iterable, ShortPredicate predicate)
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 java.lang.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
public static LazyShortIterable empty()
-
tap
public static LazyShortIterable tap(ShortIterable iterable, ShortProcedure procedure)
Creates a deferred tap iterable for the specified iterable.- Since:
- 9.0
-
-