Package com.apple.foundationdb.linear
Class Transformed.UnderlyingLens<V extends RealVector>
java.lang.Object
com.apple.foundationdb.linear.Transformed.UnderlyingLens<V>
- Type Parameters:
V- type parameter for vector class
- All Implemented Interfaces:
Lens<Transformed<V>,V>
- Enclosing class:
Transformed<V extends RealVector>
public static class Transformed.UnderlyingLens<V extends RealVector>
extends Object
implements Lens<Transformed<V>,V>
Lens to access the underlying vector of a transformed vector in logic that can be called for containers of
both vectors and transformed vectors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(Transformed<V> transformedVector) Extracts the focused attribute fromc.set(Transformed<V> ignored, V v) Returns a container equivalent tocbut with the focused attribute set toa.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.apple.foundationdb.util.Lens
compose, getNonnull, map, wrap
-
Constructor Details
-
UnderlyingLens
public UnderlyingLens()
-
-
Method Details
-
get
Description copied from interface:LensExtracts the focused attribute fromc.- Specified by:
getin interfaceLens<Transformed<V extends RealVector>,V extends RealVector> - Parameters:
transformedVector- the container; must not benull- Returns:
- the attribute, or
nullif the implementation models an absent attribute
-
set
Description copied from interface:LensReturns a container equivalent tocbut with the focused attribute set toa. Passingnullforcsignals "no existing container, build a fresh one arounda" — implementations are expected to handle this case, typically with a default for the unfocused parts of the container.- Specified by:
setin interfaceLens<Transformed<V extends RealVector>,V extends RealVector> - Parameters:
ignored- the existing container to update, ornullto construct a fresh onev- the new value of the focused attribute; may benullif the implementation supports containers without the attribute- Returns:
- a non-null container with the attribute set to
a
-
identityTransform
-