private static class GroupingAggregator.GroupingAggregatorImpl<V,K,G extends IItemConsumer<G>> extends Aggregators.MergingAggregator<V,GroupingAggregator.GroupingConsumer<K,G>>
Modifier and Type | Field and Description |
---|---|
private java.util.function.Predicate<IType<IItem>> |
acceptType |
private IItemConsumerFactory<G> |
consumerFactory |
private GroupingAggregator.IGroupsFinisher<V,K,G> |
groupsFinisher |
private IAccessorFactory<K> |
keyField |
Constructor and Description |
---|
GroupingAggregatorImpl(java.lang.String name,
java.lang.String description,
IAccessorFactory<K> keyField,
IItemConsumerFactory<G> consumerFactory,
java.util.function.Predicate<IType<IItem>> acceptType,
GroupingAggregator.IGroupsFinisher<V,K,G> groupsFinisher) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptType(IType<IItem> type) |
V |
getValue(GroupingAggregator.GroupingConsumer<K,G> consumer) |
GroupingAggregator.GroupingConsumer<K,G> |
newItemConsumer(IType<IItem> type) |
getValue
getDescription, getName, getValueType
private final GroupingAggregator.IGroupsFinisher<V,K,G extends IItemConsumer<G>> groupsFinisher
private final IAccessorFactory<K> keyField
private final IItemConsumerFactory<G extends IItemConsumer<G>> consumerFactory
GroupingAggregatorImpl(java.lang.String name, java.lang.String description, IAccessorFactory<K> keyField, IItemConsumerFactory<G> consumerFactory, java.util.function.Predicate<IType<IItem>> acceptType, GroupingAggregator.IGroupsFinisher<V,K,G> groupsFinisher)
public boolean acceptType(IType<IItem> type)
type
- an item type to check if the the factory can create consumers fortrue
if the factory can create consumers for the supplied type, false
otherwisepublic GroupingAggregator.GroupingConsumer<K,G> newItemConsumer(IType<IItem> type)
type
- an item type to get an item consumer forpublic V getValue(GroupingAggregator.GroupingConsumer<K,G> consumer)
getValue
in class Aggregators.MergingAggregator<V,GroupingAggregator.GroupingConsumer<K,G extends IItemConsumer<G>>>