Package org.openjdk.jmc.common.item
Class Aggregators.FilterConsumer<C extends IItemConsumer<C>>
- java.lang.Object
-
- org.openjdk.jmc.common.item.Aggregators.FilterConsumer<C>
-
- All Implemented Interfaces:
IItemConsumer<Aggregators.FilterConsumer<C>>
- Enclosing class:
- Aggregators
private static class Aggregators.FilterConsumer<C extends IItemConsumer<C>> extends java.lang.Object implements IItemConsumer<Aggregators.FilterConsumer<C>>
-
-
Field Summary
Fields Modifier and Type Field Description private CnestedConsumerprivate IPredicate<IItem>p
-
Constructor Summary
Constructors Constructor Description FilterConsumer(IPredicate<IItem> p, C nestedConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume(IItem item)Consumes another item.Aggregators.FilterConsumer<C>merge(Aggregators.FilterConsumer<C> other)Merges this object with the supplied object.
-
-
-
Field Detail
-
p
private final IPredicate<IItem> p
-
nestedConsumer
private final C extends IItemConsumer<C> nestedConsumer
-
-
Constructor Detail
-
FilterConsumer
public FilterConsumer(IPredicate<IItem> p, C nestedConsumer)
-
-
Method Detail
-
consume
public void consume(IItem item)
Description copied from interface:IItemConsumerConsumes another item.- Specified by:
consumein interfaceIItemConsumer<C extends IItemConsumer<C>>
-
merge
public Aggregators.FilterConsumer<C> merge(Aggregators.FilterConsumer<C> other)
Description copied from interface:IItemConsumerMerges this object with the supplied object. Normally this is another item consumer of the same type and the output result is a consumer with an internal state that reflects the state of both the current consumer and the input value.- Specified by:
mergein interfaceIItemConsumer<C extends IItemConsumer<C>>- Parameters:
other- another instance to merge with- Returns:
- the merged instance
-
-