Class ForestChange.Reorder
Object
ForestChange
Reorder
- Enclosing class:
- ForestChange
Represents a complete reorder of the direct children of a given row. The list of children must contain
exactly the same rows, but in a different order.
-
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.booleanLongListReturns the new order of the child elements.longgetUnder()Returns the parent of the reordered rows, 0 if top-level rows are reordered.inthashCode()toString()Methods inherited from class ForestChange
add, move, remove, reorder
-
Constructor Details
-
Reorder
public Reorder(long under, @NotNull LongList children) Creates a "reorder" change.
-
-
Method Details
-
getUnder
public long getUnder()Returns the parent of the reordered rows, 0 if top-level rows are reordered. -
getChildren
@NotNull public LongList getChildren()Returns the new order of the child elements. -
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
-