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 Details

    • UnderlyingLens

      public UnderlyingLens()
  • Method Details

    • get

      @Nullable public V get(@Nonnull Transformed<V> transformedVector)
      Description copied from interface: Lens
      Extracts the focused attribute from c.
      Specified by:
      get in interface Lens<Transformed<V extends RealVector>,V extends RealVector>
      Parameters:
      transformedVector - the container; must not be null
      Returns:
      the attribute, or null if the implementation models an absent attribute
    • set

      @Nonnull public Transformed<V> set(@Nullable Transformed<V> ignored, @Nullable V v)
      Description copied from interface: Lens
      Returns a container equivalent to c but with the focused attribute set to a. Passing null for c signals "no existing container, build a fresh one around a" — implementations are expected to handle this case, typically with a default for the unfocused parts of the container.
      Specified by:
      set in interface Lens<Transformed<V extends RealVector>,V extends RealVector>
      Parameters:
      ignored - the existing container to update, or null to construct a fresh one
      v - the new value of the focused attribute; may be null if the implementation supports containers without the attribute
      Returns:
      a non-null container with the attribute set to a
    • identityTransform

      @Nonnull public Transformed<V> identityTransform(@Nullable V v)