public interface IItemCollection extends java.lang.Iterable<IItemIterable>
| Modifier and Type | Method and Description |
|---|---|
IItemCollection |
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()
Deprecated.
see https://bugs.openjdk.java.net/browse/JMC-7103.
|
boolean |
hasItems() |
default java.util.stream.Stream<IItemIterable> |
parallelStream()
|
default java.util.stream.Stream<IItemIterable> |
stream()
|
default <T> java.util.function.Supplier<java.util.stream.Stream<T>> |
values(IAttribute<T> attribute)
Returns the values for the supplied attribute from this IItemCollection.
|
IItemCollection apply(IItemFilter filter)
filter - the filter to use when selecting items for the new collection<V,C extends IItemConsumer<C>> V getAggregate(IAggregator<V,C> aggregator)
V - aggregate result value typeC - Item consumer type. See IAggregator.boolean hasItems()
true if the collections contains items, false otherwise@Deprecated java.util.Set<IRange<IQuantity>> getUnfilteredTimeRanges()
default java.util.stream.Stream<IItemIterable> stream()
Streamdefault java.util.stream.Stream<IItemIterable> parallelStream()
Streamdefault <T> java.util.function.Supplier<java.util.stream.Stream<T>> values(IAttribute<T> attribute)
T - the type of the attribute, e.g. IQuantity.attribute - the attribute to retrieve values for.