Package org.openjdk.jmc.common.item
Class GroupingAggregator.GroupingAggregatorImpl<V,K,G extends IItemConsumer<G>>
- java.lang.Object
-
- org.openjdk.jmc.common.item.Aggregators.AggregatorBase<V,C>
-
- org.openjdk.jmc.common.item.Aggregators.MergingAggregator<V,GroupingAggregator.GroupingConsumer<K,G>>
-
- org.openjdk.jmc.common.item.GroupingAggregator.GroupingAggregatorImpl<V,K,G>
-
- All Implemented Interfaces:
IDescribable
,IAggregator<V,GroupingAggregator.GroupingConsumer<K,G>>
,IItemConsumerFactory<GroupingAggregator.GroupingConsumer<K,G>>
,IValueBuilder<V,java.util.Iterator<GroupingAggregator.GroupingConsumer<K,G>>>
- Enclosing class:
- GroupingAggregator
private static class GroupingAggregator.GroupingAggregatorImpl<V,K,G extends IItemConsumer<G>> extends Aggregators.MergingAggregator<V,GroupingAggregator.GroupingConsumer<K,G>>
-
-
Field Summary
Fields Modifier and Type Field Description private IPredicate<IType<IItem>>
acceptType
private IItemConsumerFactory<G>
consumerFactory
private GroupingAggregator.IGroupsFinisher<V,K,G>
groupsFinisher
private IAccessorFactory<K>
keyField
-
Constructor Summary
Constructors Constructor Description GroupingAggregatorImpl(java.lang.String name, java.lang.String description, IAccessorFactory<K> keyField, IItemConsumerFactory<G> consumerFactory, IPredicate<IType<IItem>> acceptType, GroupingAggregator.IGroupsFinisher<V,K,G> groupsFinisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptType(IType<IItem> type)
V
getValue(GroupingAggregator.GroupingConsumer<K,G> consumer)
GroupingAggregator.GroupingConsumer<K,G>
newItemConsumer(IType<IItem> type)
-
Methods inherited from class org.openjdk.jmc.common.item.Aggregators.MergingAggregator
getValue
-
Methods inherited from class org.openjdk.jmc.common.item.Aggregators.AggregatorBase
getDescription, getName, getValueType
-
-
-
-
Field Detail
-
groupsFinisher
private final GroupingAggregator.IGroupsFinisher<V,K,G extends IItemConsumer<G>> groupsFinisher
-
keyField
private final IAccessorFactory<K> keyField
-
consumerFactory
private final IItemConsumerFactory<G extends IItemConsumer<G>> consumerFactory
-
acceptType
private final IPredicate<IType<IItem>> acceptType
-
-
Constructor Detail
-
GroupingAggregatorImpl
GroupingAggregatorImpl(java.lang.String name, java.lang.String description, IAccessorFactory<K> keyField, IItemConsumerFactory<G> consumerFactory, IPredicate<IType<IItem>> acceptType, GroupingAggregator.IGroupsFinisher<V,K,G> groupsFinisher)
-
-
Method Detail
-
acceptType
public boolean acceptType(IType<IItem> type)
- Parameters:
type
- an item type to check if the the factory can create consumers for- Returns:
true
if the factory can create consumers for the supplied type,false
otherwise
-
newItemConsumer
public GroupingAggregator.GroupingConsumer<K,G> newItemConsumer(IType<IItem> type)
- Parameters:
type
- an item type to get an item consumer for- Returns:
- a new item consumer for the supplied type
-
getValue
public V getValue(GroupingAggregator.GroupingConsumer<K,G> consumer)
- Specified by:
getValue
in classAggregators.MergingAggregator<V,GroupingAggregator.GroupingConsumer<K,G extends IItemConsumer<G>>>
-
-