Class SequenceReorderDiff

java.lang.Object
com.rpl.rama.diffs.Diff
com.rpl.rama.diffs.SequenceReorderDiff

public class SequenceReorderDiff extends Diff
Represents a value in a sequence being moved from one index to another, shifting other values to new indexes in the process. Top-level diff. Expands to SequenceChangeDiff.
See Also:
  • Constructor Details

    • SequenceReorderDiff

      public SequenceReorderDiff(int fromIndex, int toIndex, int sequenceSize)
  • Method Details

    • getFromIndex

      public int getFromIndex()
      Index of element before move
    • getToIndex

      public int getToIndex()
      New index for element after move
    • getSequenceSize

      public int getSequenceSize()
      Size of sequence
    • walkExpanded

      protected boolean walkExpanded(RamaFunction1 fn)
      Overrides:
      walkExpanded in class Diff
    • doProcess

      protected void doProcess(Diff.Processor processor)
      Specified by:
      doProcess in class Diff
    • canProcess

      protected boolean canProcess(Diff.Processor processor)
      Specified by:
      canProcess in class Diff
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object