Class ForestChange.Move
Object
ForestChange
Move
- Enclosing class:
- 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class ForestChange
ForestChange.Add, ForestChange.Move, ForestChange.Remove, ForestChange.Reorder, ForestChange.Visitor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ForestChange.Visitor visitor) Apply the change to the visitorvoidapply(ArrayForest forest) Given mutable forest, apply the change to it.booleanlonggetAfter()Returns the new immediately preceding sibling of the first moved row, 0 if none.LongListReturns the moved rows.longgetUnder()Returns the new parent of the moved row, 0 if top level.inthashCode()toString()Methods inherited from class ForestChange
add, move, remove, reorder
-
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
Description copied from class:ForestChangeGiven mutable forest, apply the change to it.- Specified by:
applyin classForestChange- Parameters:
forest- forest to change
-
accept
Description copied from class:ForestChangeApply the change to the visitor- Specified by:
acceptin classForestChange- Parameters:
visitor- receiver of the call based on the type of this change
-
equals
-
hashCode
public int hashCode() -
toString
-