java.lang.Object
com.betterdiff.core.protocol.command.Move
All Implemented Interfaces:
Command
Direct Known Subclasses:
Pick

public class Move
extends java.lang.Object
implements Command
Command to move a chunk and everything below in the same text (ordinal number) by specified shift.
Author:
troomar
  • Constructor Summary

    Constructors
    Constructor Description
    Move​(int ordinalNumber, int startingYAxis, int shift)  
    Move​(Move move)  
  • Method Summary

    Modifier and Type Method Description
    void accept​(ProtocolVisitor protocolVisitor)
    Accepting a visitor to go through the protocol without having to care what command it actually is.
    Move clone()
    Method for copying commands from generic lists and data structures.
    int getOrdinalNumber()  
    int getShift()  
    int getStartingYAxis()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Move

      public Move​(int ordinalNumber, int startingYAxis, int shift)
    • Move

      public Move​(Move move)
  • Method Details

    • getOrdinalNumber

      public int getOrdinalNumber()
    • getStartingYAxis

      public int getStartingYAxis()
    • getShift

      public int getShift()
    • toString

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

      public Move 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