Package org.openjdk.jmc.common.item
Interface IItemIterable
-
- All Superinterfaces:
java.lang.Iterable<IItem>
- All Known Implementing Classes:
EventCollection.EventTypeEntry,SingleEntryItemCollection.SingleEntryIItemIterable
public interface IItemIterable extends java.lang.Iterable<IItem>
A supplier ofIteratoroverIItemwhere all items are of the same type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IItemIterableapply(IPredicate<IItem> predicate)Creates a new item iterable with all items in this iterable that pass through the filter.longgetItemCount()IType<IItem>getType()booleanhasItems()
-
-
-
Method Detail
-
hasItems
boolean hasItems()
- Returns:
- true if the iterable contains items, false otherwise
-
getItemCount
long getItemCount()
- Returns:
- the number of items in the iterable
-
apply
IItemIterable apply(IPredicate<IItem> predicate)
Creates a new item iterable with all items in this iterable that pass through the filter. The iterable may be eagerly or lazily evaluated.- Parameters:
predicate- the predicate to use when selecting items for the new collection- Returns:
- A new collection of items
-
-