Class AbstractLazyIterable<T>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.lazy.AbstractLazyIterable<T>
-
- All Implemented Interfaces:
Iterable<T>,InternalIterable<T>,LazyIterable<T>,RichIterable<T>
- Direct Known Subclasses:
ChunkBooleanIterable,ChunkByteIterable,ChunkCharIterable,ChunkDoubleIterable,ChunkFloatIterable,ChunkIntIterable,ChunkIterable,ChunkLongIterable,ChunkShortIterable,CollectBooleanToObjectIterable,CollectByteToObjectIterable,CollectCharToObjectIterable,CollectDoubleToObjectIterable,CollectFloatToObjectIterable,CollectIntToObjectIterable,CollectIterable,CollectLongToObjectIterable,CollectShortToObjectIterable,CompositeIterable,DistinctIterable,DropIterable,DropWhileIterable,FlatCollectBooleanToObjectIterable,FlatCollectByteToObjectIterable,FlatCollectCharToObjectIterable,FlatCollectDoubleToObjectIterable,FlatCollectFloatToObjectIterable,FlatCollectIntToObjectIterable,FlatCollectIterable,FlatCollectLongToObjectIterable,FlatCollectShortToObjectIterable,Interval,LazyIterableAdapter,RejectIterable,ReverseIterable,SelectInstancesOfIterable,SelectIterable,TakeIterable,TakeWhileIterable,TapIterable,ZipIterable,ZipWithIndexIterable
public abstract class AbstractLazyIterable<T> extends AbstractRichIterable<T> implements LazyIterable<T>
AbstractLazyIterable provides a base from which deferred iterables such as SelectIterable, RejectIterable and CollectIterable can be derived.
-
-
Constructor Summary
Constructors Constructor Description AbstractLazyIterable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LazyIterable<T>asLazy()LazyIterable<RichIterable<T>>chunk(int size)<V> LazyIterable<V>collect(Function<? super T,? extends V> function)LazyBooleanIterablecollectBoolean(BooleanFunction<? super T> booleanFunction)LazyByteIterablecollectByte(ByteFunction<? super T> byteFunction)LazyCharIterablecollectChar(CharFunction<? super T> charFunction)LazyDoubleIterablecollectDouble(DoubleFunction<? super T> doubleFunction)LazyFloatIterablecollectFloat(FloatFunction<? super T> floatFunction)<V> LazyIterable<V>collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)LazyIntIterablecollectInt(IntFunction<? super T> intFunction)LazyLongIterablecollectLong(LongFunction<? super T> longFunction)LazyShortIterablecollectShort(ShortFunction<? super T> shortFunction)<P,V>
LazyIterable<V>collectWith(Function2<? super T,? super P,? extends V> function, P parameter)LazyIterable<T>concatenate(Iterable<T> iterable)LazyIterable<T>distinct()LazyIterable<T>drop(int count)LazyIterable<T>dropWhile(Predicate<? super T> predicate)<V> LazyIterable<V>flatCollect(Function<? super T,? extends Iterable<V>> function)TgetFirst()TgetLast()TgetOnly()<V> Multimap<V,T>groupBy(Function<? super T,? extends V> function)<V> Multimap<V,T>groupByEach(Function<? super T,? extends Iterable<V>> function)<V> MapIterable<V,T>groupByUniqueKey(Function<? super T,? extends V> function)<R extends Collection<T>>
Rinto(R target)booleanisEmpty()<V extends Comparable<? super V>>
Optional<T>maxByOptional(Function<? super T,? extends V> function)Optional<T>maxOptional()Optional<T>maxOptional(Comparator<? super T> comparator)<V extends Comparable<? super V>>
Optional<T>minByOptional(Function<? super T,? extends V> function)Optional<T>minOptional()Optional<T>minOptional(Comparator<? super T> comparator)PartitionMutableList<T>partition(Predicate<? super T> predicate)<P> PartitionMutableList<T>partitionWith(Predicate2<? super T,? super P> predicate, P parameter)LazyIterable<T>reject(Predicate<? super T> predicate)<P> LazyIterable<T>rejectWith(Predicate2<? super T,? super P> predicate, P parameter)LazyIterable<T>select(Predicate<? super T> predicate)<S> LazyIterable<S>selectInstancesOf(Class<S> clazz)<P> LazyIterable<T>selectWith(Predicate2<? super T,? super P> predicate, P parameter)intsize()<V> ObjectDoubleMap<V>sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)<V> ObjectDoubleMap<V>sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)<V> ObjectLongMap<V>sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)<V> ObjectLongMap<V>sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)LazyIterable<T>take(int count)LazyIterable<T>takeWhile(Predicate<? super T> predicate)LazyIterable<T>tap(Procedure<? super T> procedure)<E> E[]toArray(E[] array)MutableStack<T>toStack()<S> LazyIterable<Pair<T,S>>zip(Iterable<S> that)LazyIterable<Pair<T,Integer>>zipWithIndex()-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countByEach, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, forEachWith, forEachWithIndex, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndex
-
Methods inherited from interface java.lang.Iterable
iterator, spliterator
-
Methods inherited from interface org.eclipse.collections.api.LazyIterable
flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, aggregateBy, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countBy, countByEach, countByEach, countByWith, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
-
-
-
Method Detail
-
asLazy
public LazyIterable<T> asLazy()
- Specified by:
asLazyin interfaceRichIterable<T>- Overrides:
asLazyin classAbstractRichIterable<T>
-
into
public <R extends Collection<T>> R into(R target)
- Specified by:
intoin interfaceLazyIterable<T>- Specified by:
intoin interfaceRichIterable<T>- Overrides:
intoin classAbstractRichIterable<T>
-
toArray
public <E> E[] toArray(E[] array)
- Specified by:
toArrayin interfaceRichIterable<T>- Overrides:
toArrayin classAbstractRichIterable<T>
-
size
public int size()
- Specified by:
sizein interfaceRichIterable<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceRichIterable<T>- Overrides:
isEmptyin classAbstractRichIterable<T>
-
getFirst
public T getFirst()
- Specified by:
getFirstin interfaceLazyIterable<T>- Specified by:
getFirstin interfaceRichIterable<T>
-
getLast
public T getLast()
- Specified by:
getLastin interfaceRichIterable<T>
-
getOnly
public T getOnly()
- Specified by:
getOnlyin interfaceRichIterable<T>
-
select
public LazyIterable<T> select(Predicate<? super T> predicate)
- Specified by:
selectin interfaceLazyIterable<T>- Specified by:
selectin interfaceRichIterable<T>
-
selectWith
public <P> LazyIterable<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
selectWithin interfaceLazyIterable<T>- Specified by:
selectWithin interfaceRichIterable<T>
-
reject
public LazyIterable<T> reject(Predicate<? super T> predicate)
- Specified by:
rejectin interfaceLazyIterable<T>- Specified by:
rejectin interfaceRichIterable<T>
-
rejectWith
public <P> LazyIterable<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
rejectWithin interfaceLazyIterable<T>- Specified by:
rejectWithin interfaceRichIterable<T>
-
partition
public PartitionMutableList<T> partition(Predicate<? super T> predicate)
- Specified by:
partitionin interfaceRichIterable<T>
-
partitionWith
public <P> PartitionMutableList<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
partitionWithin interfaceRichIterable<T>
-
selectInstancesOf
public <S> LazyIterable<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOfin interfaceLazyIterable<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>
-
collect
public <V> LazyIterable<V> collect(Function<? super T,? extends V> function)
- Specified by:
collectin interfaceLazyIterable<T>- Specified by:
collectin interfaceRichIterable<T>
-
collectBoolean
public LazyBooleanIterable collectBoolean(BooleanFunction<? super T> booleanFunction)
- Specified by:
collectBooleanin interfaceLazyIterable<T>- Specified by:
collectBooleanin interfaceRichIterable<T>
-
collectByte
public LazyByteIterable collectByte(ByteFunction<? super T> byteFunction)
- Specified by:
collectBytein interfaceLazyIterable<T>- Specified by:
collectBytein interfaceRichIterable<T>
-
collectChar
public LazyCharIterable collectChar(CharFunction<? super T> charFunction)
- Specified by:
collectCharin interfaceLazyIterable<T>- Specified by:
collectCharin interfaceRichIterable<T>
-
collectDouble
public LazyDoubleIterable collectDouble(DoubleFunction<? super T> doubleFunction)
- Specified by:
collectDoublein interfaceLazyIterable<T>- Specified by:
collectDoublein interfaceRichIterable<T>
-
collectFloat
public LazyFloatIterable collectFloat(FloatFunction<? super T> floatFunction)
- Specified by:
collectFloatin interfaceLazyIterable<T>- Specified by:
collectFloatin interfaceRichIterable<T>
-
collectInt
public LazyIntIterable collectInt(IntFunction<? super T> intFunction)
- Specified by:
collectIntin interfaceLazyIterable<T>- Specified by:
collectIntin interfaceRichIterable<T>
-
collectLong
public LazyLongIterable collectLong(LongFunction<? super T> longFunction)
- Specified by:
collectLongin interfaceLazyIterable<T>- Specified by:
collectLongin interfaceRichIterable<T>
-
collectShort
public LazyShortIterable collectShort(ShortFunction<? super T> shortFunction)
- Specified by:
collectShortin interfaceLazyIterable<T>- Specified by:
collectShortin interfaceRichIterable<T>
-
collectWith
public <P,V> LazyIterable<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
- Specified by:
collectWithin interfaceLazyIterable<T>- Specified by:
collectWithin interfaceRichIterable<T>
-
flatCollect
public <V> LazyIterable<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
- Specified by:
flatCollectin interfaceLazyIterable<T>- Specified by:
flatCollectin interfaceRichIterable<T>
-
concatenate
public LazyIterable<T> concatenate(Iterable<T> iterable)
- Specified by:
concatenatein interfaceLazyIterable<T>
-
collectIf
public <V> LazyIterable<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
- Specified by:
collectIfin interfaceLazyIterable<T>- Specified by:
collectIfin interfaceRichIterable<T>
-
take
public LazyIterable<T> take(int count)
- Specified by:
takein interfaceLazyIterable<T>
-
drop
public LazyIterable<T> drop(int count)
- Specified by:
dropin interfaceLazyIterable<T>
-
takeWhile
public LazyIterable<T> takeWhile(Predicate<? super T> predicate)
- Specified by:
takeWhilein interfaceLazyIterable<T>
-
dropWhile
public LazyIterable<T> dropWhile(Predicate<? super T> predicate)
- Specified by:
dropWhilein interfaceLazyIterable<T>
-
distinct
public LazyIterable<T> distinct()
- Specified by:
distinctin interfaceLazyIterable<T>
-
toStack
public MutableStack<T> toStack()
-
groupBy
public <V> Multimap<V,T> groupBy(Function<? super T,? extends V> function)
- Specified by:
groupByin interfaceRichIterable<T>
-
groupByEach
public <V> Multimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
groupByEachin interfaceRichIterable<T>
-
groupByUniqueKey
public <V> MapIterable<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>
-
zip
public <S> LazyIterable<Pair<T,S>> zip(Iterable<S> that)
- Specified by:
zipin interfaceLazyIterable<T>- Specified by:
zipin interfaceRichIterable<T>
-
zipWithIndex
public LazyIterable<Pair<T,Integer>> zipWithIndex()
- Specified by:
zipWithIndexin interfaceLazyIterable<T>- Specified by:
zipWithIndexin interfaceRichIterable<T>
-
chunk
public LazyIterable<RichIterable<T>> chunk(int size)
- Specified by:
chunkin interfaceLazyIterable<T>- Specified by:
chunkin interfaceRichIterable<T>
-
tap
public LazyIterable<T> tap(Procedure<? super T> procedure)
- Specified by:
tapin interfaceLazyIterable<T>- Specified by:
tapin interfaceRichIterable<T>
-
sumByInt
public <V> ObjectLongMap<V> sumByInt(Function<? super T,? extends V> groupBy, IntFunction<? super T> function)
- Specified by:
sumByIntin interfaceRichIterable<T>
-
sumByFloat
public <V> ObjectDoubleMap<V> sumByFloat(Function<? super T,? extends V> groupBy, FloatFunction<? super T> function)
- Specified by:
sumByFloatin interfaceRichIterable<T>
-
sumByLong
public <V> ObjectLongMap<V> sumByLong(Function<? super T,? extends V> groupBy, LongFunction<? super T> function)
- Specified by:
sumByLongin interfaceRichIterable<T>
-
sumByDouble
public <V> ObjectDoubleMap<V> sumByDouble(Function<? super T,? extends V> groupBy, DoubleFunction<? super T> function)
- Specified by:
sumByDoublein interfaceRichIterable<T>
-
minOptional
public Optional<T> minOptional(Comparator<? super T> comparator)
- Specified by:
minOptionalin interfaceRichIterable<T>
-
maxOptional
public Optional<T> maxOptional(Comparator<? super T> comparator)
- Specified by:
maxOptionalin interfaceRichIterable<T>
-
minOptional
public Optional<T> minOptional()
- Specified by:
minOptionalin interfaceRichIterable<T>
-
maxOptional
public Optional<T> maxOptional()
- Specified by:
maxOptionalin interfaceRichIterable<T>
-
minByOptional
public <V extends Comparable<? super V>> Optional<T> minByOptional(Function<? super T,? extends V> function)
- Specified by:
minByOptionalin interfaceRichIterable<T>
-
maxByOptional
public <V extends Comparable<? super V>> Optional<T> maxByOptional(Function<? super T,? extends V> function)
- Specified by:
maxByOptionalin interfaceRichIterable<T>
-
-