ValueIn
- the input value typeValueOut
- the extracted / transformed value typeAggregator
@Deprecated public interface PropertyExtractor<ValueIn,ValueOut> extends Serializable
public class EmployeeIntTransformer implements PropertyExtractor<Employee, Integer> { public Integer extract(Employee value) { return value.getSalaryPerMonth(); } } Supplier supplier = Supplier.all(new EmployeeIntTransformer());Or in Java 8:
Supplier supplier = Supplier.all((value) -> value.getSalaryPerMonth());
Modifier and Type | Method and Description |
---|---|
ValueOut |
extract(ValueIn value)
Deprecated.
This method is called for every value that is about to be supplied to
an aggregation (maybe filtered through an
Predicate
or KeyPredicate ). |
ValueOut extract(ValueIn value)
Predicate
or KeyPredicate
). It is responsible to either
transform the input value to a type of ValueOut
or to extract an
attribute of this type.value
- the input valueCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.