Class PositionImpl

java.lang.Object
org.refcodes.graphical.PositionImpl
All Implemented Interfaces:
Position, PosXAccessor, PosYAccessor
Direct Known Subclasses:
PositionPropertyBuilder

public class PositionImpl extends Object implements Position
The Class PositionImpl.
  • Field Details

    • _posX

      protected int _posX
    • _posY

      protected int _posY
  • Constructor Details

    • PositionImpl

      protected PositionImpl()
      Instantiates a new position impl.
    • PositionImpl

      public PositionImpl(int aPosX, int aPosY)
      Instantiates a new position impl.
      Parameters:
      aPosX - the pos X
      aPosY - the pos Y
  • Method Details

    • getPositionX

      public int getPositionX()
      Retrieves the X position from the X position property.
      Specified by:
      getPositionX in interface PosXAccessor
      Returns:
      The X position stored by the X position property.
    • getPositionY

      public int getPositionY()
      Retrieves the Y position from the Y position property.
      Specified by:
      getPositionY in interface PosYAccessor
      Returns:
      The Y position stored by the Y position property.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object