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 C
nestedConsumer
private 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 void
consume(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:IItemConsumer
Consumes another item.- Specified by:
consume
in interfaceIItemConsumer<C extends IItemConsumer<C>>
-
merge
public Aggregators.FilterConsumer<C> merge(Aggregators.FilterConsumer<C> other)
Description copied from interface:IItemConsumer
Merges 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:
merge
in interfaceIItemConsumer<C extends IItemConsumer<C>>
- Parameters:
other
- another instance to merge with- Returns:
- the merged instance
-
-