Class PositionChangedEventImpl<P extends Player<P,​?>>

java.lang.Object
org.refcodes.checkerboard.AbstractPlayerEvent<P>
org.refcodes.checkerboard.PositionChangedEventImpl<P>
Type Parameters:
P - the generic type
All Implemented Interfaces:
PlayerEvent<P>, PositionChangedEvent<P>, org.refcodes.graphical.Position, org.refcodes.graphical.PosXAccessor, org.refcodes.graphical.PosYAccessor, org.refcodes.graphical.Vector, org.refcodes.graphical.VectorXAccessor, org.refcodes.graphical.VectorYAccessor, org.refcodes.mixin.ActionAccessor<PlayerAction>, org.refcodes.mixin.SourceAccessor<P>, org.refcodes.observer.GenericActionEvent<PlayerAction,​P>, org.refcodes.observer.GenericEvent<P>

public class PositionChangedEventImpl<P extends Player<P,​?>>
extends AbstractPlayerEvent<P>
implements PositionChangedEvent<P>
The Class PositionChangedEventImpl.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.ActionAccessor

    org.refcodes.mixin.ActionAccessor.ActionBuilder<A extends Object,​B extends org.refcodes.mixin.ActionAccessor.ActionBuilder<A,​B>>, org.refcodes.mixin.ActionAccessor.ActionMutator<A extends Object>, org.refcodes.mixin.ActionAccessor.ActionProperty<A extends Object>

    Nested classes/interfaces inherited from interface org.refcodes.graphical.Position

    org.refcodes.graphical.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.PosXAccessor

    org.refcodes.graphical.PosXAccessor.PosXBuilder<B extends org.refcodes.graphical.PosXAccessor.PosXBuilder<B>>, org.refcodes.graphical.PosXAccessor.PosXMutator, org.refcodes.graphical.PosXAccessor.PosXProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.PosYAccessor

    org.refcodes.graphical.PosYAccessor.PosYBuilder<B extends org.refcodes.graphical.PosYAccessor.PosYBuilder<B>>, org.refcodes.graphical.PosYAccessor.PosYMutator, org.refcodes.graphical.PosYAccessor.PosYProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.SourceAccessor

    org.refcodes.mixin.SourceAccessor.SourceMutator<SRC extends Object>, org.refcodes.mixin.SourceAccessor.SourceProperty<SRC extends Object>

    Nested classes/interfaces inherited from interface org.refcodes.graphical.Vector

    org.refcodes.graphical.Vector.VectorBuilder<B extends org.refcodes.graphical.Vector.VectorBuilder<B>>, org.refcodes.graphical.Vector.VectorMutator, org.refcodes.graphical.Vector.VectorProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.VectorXAccessor

    org.refcodes.graphical.VectorXAccessor.VectorXBuilder<B extends org.refcodes.graphical.VectorXAccessor.VectorXBuilder<B>>, org.refcodes.graphical.VectorXAccessor.VectorXMutator, org.refcodes.graphical.VectorXAccessor.VectorXProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.VectorYAccessor

    org.refcodes.graphical.VectorYAccessor.VectorYBuilder<B extends org.refcodes.graphical.VectorYAccessor.VectorYBuilder<B>>, org.refcodes.graphical.VectorYAccessor.VectorYMutator, org.refcodes.graphical.VectorYAccessor.VectorYProperty
  • Field Summary

    Fields inherited from interface org.refcodes.checkerboard.PositionChangedEvent

    ACTION
  • Constructor Summary

    Constructors
    Constructor Description
    PositionChangedEventImpl​(int aPosX, int aPosY, int aPrePosX, int aPrePosY, P aSource)
    Instantiates a new position changed event.
    PositionChangedEventImpl​(org.refcodes.graphical.Position aPosition, org.refcodes.graphical.Position aPrecedingPosition, P aSource)
    Instantiates a new position changed event.
  • Method Summary

    Modifier and Type Method Description
    int getPositionX()
    int getPositionY()
    org.refcodes.graphical.Position getPrecedingPosition()
    Gets the preceding position.
    int getVectorX()
    int getVectorY()
    String toString()

    Methods inherited from class org.refcodes.checkerboard.AbstractPlayerEvent

    getAction, getSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.refcodes.mixin.ActionAccessor

    getAction

    Methods inherited from interface org.refcodes.graphical.Position

    toAddTo, toSubFrom

    Methods inherited from interface org.refcodes.mixin.SourceAccessor

    getSource
  • Constructor Details

    • PositionChangedEventImpl

      public PositionChangedEventImpl​(int aPosX, int aPosY, int aPrePosX, int aPrePosY, P aSource)
      Instantiates a new position changed event.
      Parameters:
      aPosX - the pos X
      aPosY - the pos Y
      aPrePosX - the pre pos X
      aPrePosY - the pre pos Y
      aSource - The according source (origin).
    • PositionChangedEventImpl

      public PositionChangedEventImpl​(org.refcodes.graphical.Position aPosition, org.refcodes.graphical.Position aPrecedingPosition, P aSource)
      Instantiates a new position changed event.
      Parameters:
      aPosition - the position
      aPrecedingPosition - the preceding position
      aSource - The according source (origin).
  • Method Details

    • getPrecedingPosition

      public org.refcodes.graphical.Position getPrecedingPosition()
      Gets the preceding position.
      Specified by:
      getPrecedingPosition in interface PositionChangedEvent<P extends Player<P,​?>>
      Returns:
      the preceding position
    • getPositionX

      public int getPositionX()
      Specified by:
      getPositionX in interface org.refcodes.graphical.PosXAccessor
    • getPositionY

      public int getPositionY()
      Specified by:
      getPositionY in interface org.refcodes.graphical.PosYAccessor
    • getVectorX

      public int getVectorX()
      Specified by:
      getVectorX in interface org.refcodes.graphical.VectorXAccessor
    • getVectorY

      public int getVectorY()
      Specified by:
      getVectorY in interface org.refcodes.graphical.VectorYAccessor
    • toString

      public String toString()
      Overrides:
      toString in class AbstractPlayerEvent<P extends Player<P,​?>>