Class Vector.View<V extends Vector>

java.lang.Object
de.linusdev.lutils.math.vector.Vector.View<V>
Type Parameters:
V - FloatN, IntN or LongN
All Implemented Interfaces:
Vector
Direct Known Subclasses:
FloatN.View
Enclosing interface:
Vector

public abstract static class Vector.View<V extends Vector> extends Object implements Vector
  • Field Details

    • original

      @NotNull protected final V extends Vector original
    • mapping

      protected final int @NotNull [] mapping
  • Constructor Details

    • View

      protected View(@NotNull V original, int @NotNull [] mapping)
  • Method Details

    • getOriginal

      @NotNull public V getOriginal()
      Specified by:
      getOriginal in interface Vector
      Returns:
      the original vector this vector views to
    • getMapping

      public int @NotNull [] getMapping()
      Description copied from interface: Vector
      The returned mapping must always map to a non view vector.
      Specified by:
      getMapping in interface Vector
      Returns:
      the mapping to the original vector
    • isArrayBacked

      public boolean isArrayBacked()
      Description copied from interface: Vector
      Whether this vector is array backed.
      Specified by:
      isArrayBacked in interface Vector
      Returns:
      true if this vector is array backed.
    • isBufferBacked

      public boolean isBufferBacked()
      Description copied from interface: Vector
      Whether this vector is buffer backed. If this method returns true, Vector.getStructure() will not throw an UnsupportedOperationException.
      Specified by:
      isBufferBacked in interface Vector
      Returns:
      true if this vector is buffer backed.
    • isView

      public boolean isView()
      Description copied from interface: Vector
      Whether this vector is only a view onto another vector.
      Specified by:
      isView in interface Vector
      Returns:
      true if this vector is a view.