private static class ItemCollectionToolkit.StreamBackedItemCollection extends java.lang.Object implements IItemCollection
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<IRange<IQuantity>> |
chunkRanges |
private java.util.function.Supplier<java.util.stream.Stream<IItemIterable>> |
items |
| Constructor and Description |
|---|
StreamBackedItemCollection(java.util.function.Supplier<java.util.stream.Stream<IItemIterable>> items,
java.util.Set<IRange<IQuantity>> chunkRanges) |
| Modifier and Type | Method and Description |
|---|---|
ItemCollectionToolkit.StreamBackedItemCollection |
apply(IItemFilter filter)
Creates a new item collection with all items in this collection that pass through the filter.
|
<V,C extends IItemConsumer<C>> |
getAggregate(IAggregator<V,C> aggregator)
Calculates an aggregated value for the items in this collection.
|
java.util.Set<IRange<IQuantity>> |
getUnfilteredTimeRanges()
Returns a set of IRange representations of the time ranges represented by this item
collection.
|
boolean |
hasItems() |
java.util.Iterator<IItemIterable> |
iterator() |
java.util.Spliterator<IItemIterable> |
spliterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparallelStream, stream, valuesprivate final java.util.function.Supplier<java.util.stream.Stream<IItemIterable>> items
StreamBackedItemCollection(java.util.function.Supplier<java.util.stream.Stream<IItemIterable>> items, java.util.Set<IRange<IQuantity>> chunkRanges)
public java.util.Iterator<IItemIterable> iterator()
iterator in interface java.lang.Iterable<IItemIterable>public java.util.Spliterator<IItemIterable> spliterator()
spliterator in interface java.lang.Iterable<IItemIterable>public ItemCollectionToolkit.StreamBackedItemCollection apply(IItemFilter filter)
IItemCollectionapply in interface IItemCollectionfilter - the filter to use when selecting items for the new collectionpublic <V,C extends IItemConsumer<C>> V getAggregate(IAggregator<V,C> aggregator)
IItemCollectiongetAggregate in interface IItemCollectionV - aggregate result value typeC - Item consumer type. See IAggregator.public boolean hasItems()
hasItems in interface IItemCollectiontrue if the collections contains items, false otherwisepublic java.util.Set<IRange<IQuantity>> getUnfilteredTimeRanges()
IItemCollectiongetUnfilteredTimeRanges in interface IItemCollection