Class ForestChange.Move

Enclosing class:
ForestChange

public static class ForestChange.Move extends ForestChange
Represents moving one or more rows from their current places in forest under the specified position. The rows may come from under different parents in the forest. They are placed in sequence, according to the list, at (under, after) position.
  • Constructor Details

    • Move

      public Move(@NotNull LongList movedRows, long under, long after)
  • Method Details

    • getMovedRows

      @NotNull public LongList getMovedRows()
      Returns the moved rows. They are placed in the target position in the order they appear in this list. All sub-rows of these rows are moved along with their parent.
    • getUnder

      public long getUnder()
      Returns the new parent of the moved row, 0 if top level.
    • getAfter

      public long getAfter()
      Returns the new immediately preceding sibling of the first moved row, 0 if none.
    • apply

      public void apply(@NotNull ArrayForest forest)
      Description copied from class: ForestChange
      Given mutable forest, apply the change to it.
      Specified by:
      apply in class ForestChange
      Parameters:
      forest - forest to change
    • accept

      public void accept(ForestChange.Visitor visitor)
      Description copied from class: ForestChange
      Apply the change to the visitor
      Specified by:
      accept in class ForestChange
      Parameters:
      visitor - receiver of the call based on the type of this change
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object