final class SingleEntryItemCollection extends java.lang.Object implements IItemCollection
IItem
as an IItemCollection
.Modifier and Type | Class and Description |
---|---|
private static class |
SingleEntryItemCollection.SingleEntryIItemIterable |
private static class |
SingleEntryItemCollection.SingleEntryIteratorOfIterable |
Modifier and Type | Field and Description |
---|---|
private java.util.Set<IRange<IQuantity>> |
chunkRanges |
private IItem |
item |
private static IItemCollection |
NULLCOLLECTION |
private static IItemIterable |
NULLITERABLE |
Constructor and Description |
---|
SingleEntryItemCollection(IItem item,
java.util.Set<IRange<IQuantity>> chunkRanges) |
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()
Returns a set of IRange representations of the time ranges represented by this item
collection.
|
boolean |
hasItems() |
java.util.Iterator<IItemIterable> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parallelStream, stream, values
private static final IItemCollection NULLCOLLECTION
private static final IItemIterable NULLITERABLE
private final IItem item
public java.util.Iterator<IItemIterable> iterator()
iterator
in interface java.lang.Iterable<IItemIterable>
public IItemCollection apply(IItemFilter filter)
IItemCollection
apply
in interface IItemCollection
filter
- the filter to use when selecting items for the new collectionpublic <V,C extends IItemConsumer<C>> V getAggregate(IAggregator<V,C> aggregator)
IItemCollection
getAggregate
in interface IItemCollection
V
- aggregate result value typeC
- Item consumer type. See IAggregator
.public boolean hasItems()
hasItems
in interface IItemCollection
true
if the collections contains items, false
otherwisepublic java.util.Set<IRange<IQuantity>> getUnfilteredTimeRanges()
IItemCollection
getUnfilteredTimeRanges
in interface IItemCollection