com.almworks.jira.structure.api.forest
Class ForestOp.Remove

java.lang.Object
  extended by com.almworks.jira.structure.api.forest.ForestOp
      extended by com.almworks.jira.structure.api.forest.ForestOp.Remove
Enclosing class:
ForestOp

public static class ForestOp.Remove
extends ForestOp

Represents the remove operation.

See Also:
ForestOp, ForestAccessor.removeSubtree(java.lang.Long, java.lang.Long)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.almworks.jira.structure.api.forest.ForestOp
ForestOp.Add, ForestOp.Move, ForestOp.Remove
 
Constructor Summary
ForestOp.Remove(long issue, Forest removedSubtree, com.almworks.integers.LongList parentPath, long after, com.almworks.integers.LongList parents, com.almworks.integers.LongList ancestors)
           
 
Method Summary
 com.almworks.integers.LongList getAffectedIssues()
          This method returns the list of issues that were subject to the operation, or possibly the reduced set of these issues if other affected issues can be implied from the returned list and the current forest state.
 long getAfter()
           
 com.almworks.integers.LongList getAnchorIssues()
           
 long getIssue()
           
 com.almworks.integers.LongList getParentPath()
           
 Forest getRemovedSubtree()
           
 String toString()
           
 
Methods inherited from class com.almworks.jira.structure.api.forest.ForestOp
getAncestors, getParents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForestOp.Remove

public ForestOp.Remove(long issue,
                       Forest removedSubtree,
                       com.almworks.integers.LongList parentPath,
                       long after,
                       com.almworks.integers.LongList parents,
                       com.almworks.integers.LongList ancestors)
Method Detail

getIssue

public long getIssue()
Returns:
The removed issue.

getRemovedSubtree

@NotNull
public Forest getRemovedSubtree()
Returns:
The whole removed subtree rooted at getIssue().

getParentPath

@NotNull
public com.almworks.integers.LongList getParentPath()
Returns:
The parent path of the removed issue in the original forest.
See Also:
Forest.getParentPathForIndex(int)

getAfter

public long getAfter()
Returns:
The immediately preceding sibling of the removed issue in the original forest, 0 if none.

getAffectedIssues

@NotNull
public com.almworks.integers.LongList getAffectedIssues()
Description copied from class: ForestOp

This method returns the list of issues that were subject to the operation, or possibly the reduced set of these issues if other affected issues can be implied from the returned list and the current forest state.

Namely, ForestOp.Move returns only the top issue in this list because all other issues moved can be figured from the state after the operation. If it wasn't the last operation then this holds true transitively via other operations.

Specified by:
getAffectedIssues in class ForestOp
Returns:
a list of issues affected by this operation

getAnchorIssues

@NotNull
public com.almworks.integers.LongList getAnchorIssues()
Specified by:
getAnchorIssues in class ForestOp
Returns:
issues that are used to define this operation - used to check whether the operation is visible to a user

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 ALMWorks. All Rights Reserved.