java.lang.Object
com.betterdiff.core.protocol.command.Mutation
All Implemented Interfaces:
Command

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
Author:
troomar
  • 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()
      Overrides:
      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