private static class ItemIterableToolkit.StreamBackedItemIterable extends java.lang.Object implements IItemIterable
Modifier and Type | Field and Description |
---|---|
private java.util.function.Supplier<java.util.stream.Stream<IItem>> |
items |
private IType<IItem> |
type |
Constructor and Description |
---|
StreamBackedItemIterable(java.util.function.Supplier<java.util.stream.Stream<IItem>> items,
IType<IItem> type) |
Modifier and Type | Method and Description |
---|---|
IItemIterable |
apply(java.util.function.Predicate<IItem> filter)
Creates a new item iterable with all items in this iterable that pass through the filter.
|
long |
getItemCount() |
IType<IItem> |
getType() |
boolean |
hasItems() |
java.util.Iterator<IItem> |
iterator() |
java.util.Spliterator<IItem> |
spliterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, parallelStream, stream
private final java.util.function.Supplier<java.util.stream.Stream<IItem>> items
public IType<IItem> getType()
getType
in interface IItemIterable
public boolean hasItems()
hasItems
in interface IItemIterable
public long getItemCount()
getItemCount
in interface IItemIterable
public java.util.Iterator<IItem> iterator()
iterator
in interface java.lang.Iterable<IItem>
public java.util.Spliterator<IItem> spliterator()
spliterator
in interface java.lang.Iterable<IItem>
public IItemIterable apply(java.util.function.Predicate<IItem> filter)
IItemIterable
apply
in interface IItemIterable
filter
- the predicate to use when selecting items for the new collection