Class SingleEntryItemCollection.SingleEntryIItemIterable
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.jdk.util.SingleEntryItemCollection.SingleEntryIItemIterable
-
- All Implemented Interfaces:
java.lang.Iterable<IItem>,IItemIterable
- Enclosing class:
- SingleEntryItemCollection
private static class SingleEntryItemCollection.SingleEntryIItemIterable extends java.lang.Object implements IItemIterable
-
-
Constructor Summary
Constructors Constructor Description SingleEntryIItemIterable(IItem item)
-
Method Summary
All Methods Instance Methods Concrete 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()java.util.Iterator<IItem>iterator()
-
-
-
Field Detail
-
itemList
private final java.util.List<IItem> itemList
-
-
Constructor Detail
-
SingleEntryIItemIterable
public SingleEntryIItemIterable(IItem item)
-
-
Method Detail
-
iterator
public java.util.Iterator<IItem> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<IItem>
-
getType
public IType<IItem> getType()
- Specified by:
getTypein interfaceIItemIterable- Returns:
- The type for all items in the iterator
-
hasItems
public boolean hasItems()
- Specified by:
hasItemsin interfaceIItemIterable- Returns:
- true if the iterable contains items, false otherwise
-
getItemCount
public long getItemCount()
- Specified by:
getItemCountin interfaceIItemIterable- Returns:
- the number of items in the iterable
-
apply
public IItemIterable apply(IPredicate<IItem> predicate)
Description copied from interface:IItemIterableCreates a new item iterable with all items in this iterable that pass through the filter. The iterable may be eagerly or lazily evaluated.- Specified by:
applyin interfaceIItemIterable- Parameters:
predicate- the predicate to use when selecting items for the new collection- Returns:
- A new collection of items
-
-