Package quadbase.util

Class Position

java.lang.Object
quadbase.util.Position

public class Position extends Object
This class contains methods to define and manipulate a 2D point on the chart. The coordinates are floating point numbers and can represent a relative position in the main chart window.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty Constructor
    Position(float x1, float y1)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the two points are the same or not.
    final float
    Returns the x coordinate.
    final float
    Returns the y coordinate.
    int
    Returns the hashcode for the Position.
    final void
    set(float x1, float y1)
    Set the x and y values.
    final void
    setX(float f)
    Set value of x.
    final void
    setY(float f)
    Set value of y.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Position

      public Position()
      Empty Constructor
    • Position

      public Position(float x1, float y1)
      Constructor
  • Method Details

    • getX

      public final float getX()
      Returns the x coordinate.
      Returns:
      The x coordinate.
    • getY

      public final float getY()
      Returns the y coordinate.
      Returns:
      The y coordinate.
    • setX

      public final void setX(float f)
      Set value of x.
      Parameters:
      f - The x coordinate.
    • setY

      public final void setY(float f)
      Set value of y.
      Parameters:
      f - The y coordinate.
    • set

      public final void set(float x1, float y1)
      Set the x and y values.
      Parameters:
      x1 - The x coordinate.
      y1 - The y coordinate.
    • equals

      public boolean equals(Position p)
      Checks if the two points are the same or not.
      Returns:
      true iff coordinates of both vertices are equal.
    • hashCode

      public int hashCode()
      Returns the hashcode for the Position.
      Overrides:
      hashCode in class Object
      Returns:
      The int hash code.