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 ofIterator
overIItem
where all items are of the same type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IItemIterable
apply(IPredicate<IItem> predicate)
Creates a new item iterable with all items in this iterable that pass through the filter.long
getItemCount()
IType<IItem>
getType()
boolean
hasItems()
-
-
-
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
-
-