Class ImmutableVector2D

java.lang.Object
com.xebisco.yield.Vector2D
com.xebisco.yield.ImmutableVector2D
All Implemented Interfaces:
Serializable

public class ImmutableVector2D extends Vector2D
ImmutableVector2D class extends Vector2D and provides an immutable version of the Vector2D class. It does not allow modification of its x and y coordinates after initialization.
See Also:
  • Constructor Details

    • ImmutableVector2D

      public ImmutableVector2D(double x, double y)
  • Method Details

    • setX

      public Vector2D setX(double x)
      Description copied from class: Vector2D
      This function sets the value of the x variable to the value of the x parameter.
      Overrides:
      setX in class Vector2D
      Parameters:
      x - The x coordinate of the point.
    • setY

      public Vector2D setY(double y)
      Description copied from class: Vector2D
      This function sets the y coordinate of the point to the value of the parameter y.
      Overrides:
      setY in class Vector2D
      Parameters:
      y - The y coordinate of the point.