class EventCollection extends java.lang.Object implements IItemCollection
IItemCollection
using IItemIterable
iterators.
This class is only intended to be used as an IItemCollection outside of the usage in
JfrLoaderToolkit
.Modifier and Type | Class and Description |
---|---|
private static class |
EventCollection.EventTypeEntry |
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<EventCollection.EventTypeEntry> |
items |
private java.util.Set<IType<IItem>> |
types |
Modifier | Constructor and Description |
---|---|
private |
EventCollection(java.util.ArrayList<EventCollection.EventTypeEntry> items) |
Modifier and Type | Method and Description |
---|---|
private static <V,C extends IItemConsumer<C>> |
aggregate(IAggregator<V,C> aggregator,
java.util.Iterator<? extends IItemIterable> items) |
EventCollection |
apply(IItemFilter filter)
Creates a new item collection with all items in this collection that pass through the filter.
|
(package private) static IItemCollection |
build(EventArray[] events) |
private static java.util.Iterator<IItem> |
buildIterator(IItem[] array,
IPredicate<? super IItem> filter) |
<V,C extends IItemConsumer<C>> |
getAggregate(IAggregator<V,C> aggregator)
Calculates an aggregated value for the items in this collection.
|
boolean |
hasItems() |
private static boolean |
isFiltered(IPredicate<?> filter) |
java.util.Iterator<IItemIterable> |
iterator() |
private final java.util.ArrayList<EventCollection.EventTypeEntry> items
private EventCollection(java.util.ArrayList<EventCollection.EventTypeEntry> items)
static IItemCollection build(EventArray[] events)
public EventCollection apply(IItemFilter filter)
IItemCollection
apply
in interface IItemCollection
filter
- the filter to use when selecting items for the new collectionprivate static java.util.Iterator<IItem> buildIterator(IItem[] array, IPredicate<? super IItem> filter)
private static boolean isFiltered(IPredicate<?> filter)
public java.util.Iterator<IItemIterable> iterator()
iterator
in interface java.lang.Iterable<IItemIterable>
public boolean hasItems()
hasItems
in interface IItemCollection
true
if the collections contains items, false
otherwisepublic <V,C extends IItemConsumer<C>> V getAggregate(IAggregator<V,C> aggregator)
IItemCollection
getAggregate
in interface IItemCollection
V
- aggregate result value typeC
- Item consumer type. See IAggregator
.private static <V,C extends IItemConsumer<C>> V aggregate(IAggregator<V,C> aggregator, java.util.Iterator<? extends IItemIterable> items)