Package com.hazelcast.projection
Interface Projection<I,O>
-
- Type Parameters:
I
- input typeO
- output type
- All Superinterfaces:
java.io.Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Projection<I,O> extends java.io.Serializable
Enables transforming object into other objects. Exemplary usage scenario is the project() method of theIMap
Only 1:1 transformations allowed. Use an Aggregator to perform N:1 or N:M aggregations.
IMap<String, Employee> employees = instance.getMap("employees"); Collection<String> names = employees.project(new Projection<Map.Entry<String,Employee>,String>(){ @Override public String transform(Map.Entry<String, Employee> entry){ return entry.getValue().getName(); } });
- Since:
- 3.8
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description O
transform(I input)
Transforms the input object into the output object.
-