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 IItem |
item |
private static IItemCollection |
NULLCOLLECTION |
private static IItemIterable |
NULLITERABLE |
| Constructor and Description |
|---|
SingleEntryItemCollection(IItem item) |
| 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.
|
boolean |
hasItems() |
java.util.Iterator<IItemIterable> |
iterator() |
private static final IItemCollection NULLCOLLECTION
private static final IItemIterable NULLITERABLE
private final IItem item
SingleEntryItemCollection(IItem item)
public java.util.Iterator<IItemIterable> iterator()
iterator in interface java.lang.Iterable<IItemIterable>public IItemCollection 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 otherwise