All Implemented Interfaces:

public class Mutation
extends java.lang.Object
implements Command
Mutation. For some mutations not all attributes are needed. All mutations are valid in both directions, originalCell <--> targetCell
  • Constructor Details

    • Mutation

      public Mutation​(MutationType mutationType, int originalOrdinalNumber, int originalYAxis, int targetOrdinalNumber, int targetYAxis)
    • Mutation

      public Mutation​(Mutation mutation)
  • Method Details

    • getMutationType

      public MutationType getMutationType()
    • getOriginalOrdinalNumber

      public int getOriginalOrdinalNumber()
    • getOriginalYAxis

      public int getOriginalYAxis()
    • getTargetOrdinalNumber

      public int getTargetOrdinalNumber()
    • getTargetYAxis

      public int getTargetYAxis()
    • toString

      public java.lang.String toString()
      toString in class java.lang.Object
    • clone

      public Mutation clone()
      Description copied from interface: Command
      Method for copying commands from generic lists and data structures. Cloning shouldn't use standard Java cloning routines, it should always call its supposed cloning constructor or factory method.
      Specified by:
      clone in interface Command
    • accept

      public void accept​(ProtocolVisitor protocolVisitor)
      Description copied from interface: Command
      Accepting a visitor to go through the protocol without having to care what command it actually is.
      Specified by:
      accept in interface Command