Class IdentityProjection<K,V>
java.lang.Object
com.loomcache.server.compute.IdentityProjection<K,V>
- Type Parameters:
K- the type of the keyV- the type of the value
- All Implemented Interfaces:
Projection<K, V, Map.Entry<K,V>>
Built-in projection that returns the entire Map.Entry unchanged.
Usage:
Projectioninvalid input: '<'String, Integer, Map.Entryinvalid input: '<'String, Integer>> identity = new IdentityProjectioninvalid input: '<'>(); Listinvalid input: '<'Map.Entryinvalid input: '<'String, Integer>> entries = executor.project(identity);
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IdentityProjection
public IdentityProjection()Create a new identity projection.
-
-
Method Details
-
transform
Description copied from interface:ProjectionTransform a map entry to the projected result.- Specified by:
transformin interfaceProjection<K, V, Map.Entry<K,V>> - Parameters:
entry- the detached, immutable entry snapshot to transform; the server provides a read-only snapshot, and direct callers must do the same because invokingMap.Entry.setValue(Object)never updates cache state and is unsupported- Returns:
- the projected result
-