Package org.openjdk.jmc.flightrecorder
Class EventCollection.EventTypeEntry
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.EventCollection.EventTypeEntry
-
- All Implemented Interfaces:
java.lang.Iterable<IItem>
,IItemIterable
- Enclosing class:
- EventCollection
private static class EventCollection.EventTypeEntry extends java.lang.Object implements IItemIterable
-
-
Field Summary
Fields Modifier and Type Field Description (package private) EventArray
events
(package private) IPredicate<IItem>
predicate
-
Constructor Summary
Constructors Constructor Description EventTypeEntry(EventArray events)
EventTypeEntry(EventArray events, IPredicate<IItem> predicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventCollection.EventTypeEntry
apply(IPredicate<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()
-
-
-
Field Detail
-
events
final EventArray events
-
predicate
final IPredicate<IItem> predicate
-
-
Constructor Detail
-
EventTypeEntry
EventTypeEntry(EventArray events)
-
EventTypeEntry
EventTypeEntry(EventArray events, IPredicate<IItem> predicate)
-
-
Method Detail
-
getType
public IType<IItem> getType()
- Specified by:
getType
in interfaceIItemIterable
- Returns:
- The type for all items in the iterator
-
iterator
public java.util.Iterator<IItem> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<IItem>
-
hasItems
public boolean hasItems()
- Specified by:
hasItems
in interfaceIItemIterable
- Returns:
- true if the iterable contains items, false otherwise
-
getItemCount
public long getItemCount()
- Specified by:
getItemCount
in interfaceIItemIterable
- Returns:
- the number of items in the iterable
-
apply
public EventCollection.EventTypeEntry apply(IPredicate<IItem> filter)
Description copied from interface:IItemIterable
Creates 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:
apply
in interfaceIItemIterable
- Parameters:
filter
- the predicate to use when selecting items for the new collection- Returns:
- A new collection of items
-
-