Package com.hazelcast.projection
Class Projections
java.lang.Object
com.hazelcast.projection.Projections
A utility class to create basic
Projection instances.- Since:
- 3.8
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Projection<T,T> identity()Returns a projection that does no transformation.static <I> Projection<I,Object[]> multiAttribute(String... attributePaths) Returns a projection that extracts the value of the givenattributePaths.static <I,O> Projection<I, O> singleAttribute(String attributePath) Returns a projection that extracts the value of the givenattributePath.
-
Method Details
-
identity
Returns a projection that does no transformation.If you use the returned projection in a 3.9 cluster it may cause a serialization exception.
- Type Parameters:
T- type- Since:
- 3.10
-
singleAttribute
Returns a projection that extracts the value of the givenattributePath.- Type Parameters:
I- input typeO- output type- Parameters:
attributePath- single attribute path, path must not be null or empty
-
multiAttribute
Returns a projection that extracts the value of the givenattributePaths. The attribute values will be returned as anObject[]array from each projection call.- Type Parameters:
I- input type- Parameters:
attributePaths- attribute paths, paths must not be null or empty
-