Package cruise.umple.compiler
Class TokenTree
java.lang.Object
cruise.umple.compiler.TokenTree
public class TokenTree
extends java.lang.Object
This class used to represent the binary tree of require-statement argument
Ex: require [A and B or C] will be formed as:
... or...
... and... C
A B
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
delete()
FeatureLink.FeatureConnectingOpType
getFeatureConnectionOpType(boolean isSubFeature)
This method selects the the connection operator type based on the type of the (linking) token.boolean
getIsLinkingOperator()
boolean
getIsNegated()
boolean
getIsOpt()
TokenTree
getLeftTokenTree()
Token
getNodeToken()
TokenTree
getParentTokenTree()
int
getPriority()
This methods returens the priority of a node to move down in the binary tree.TokenTree
getRightTokenTree()
void
replaceWith(TokenTree newTokenTree)
This method replaces the current TokenTree with a new TokenTree.boolean
setIsLinkingOperator(boolean aIsLinkingOperator)
boolean
setIsNegated(boolean aIsNegated)
boolean
setIsOpt(boolean aIsOpt)
boolean
setLeftTokenTree(TokenTree aLeftTokenTree)
boolean
setNodeToken(Token aNodeToken)
boolean
setParentTokenTree(TokenTree aParentTokenTree)
boolean
setRightTokenTree(TokenTree aRightTokenTree)
java.lang.String
toString()
-
Constructor Details
-
Method Details
-
setNodeToken
-
setParentTokenTree
-
setLeftTokenTree
-
setRightTokenTree
-
setIsNegated
public boolean setIsNegated(boolean aIsNegated) -
setIsOpt
public boolean setIsOpt(boolean aIsOpt) -
setIsLinkingOperator
public boolean setIsLinkingOperator(boolean aIsLinkingOperator) -
getNodeToken
-
getParentTokenTree
-
getLeftTokenTree
-
getRightTokenTree
-
getIsNegated
public boolean getIsNegated() -
getIsOpt
public boolean getIsOpt() -
getIsLinkingOperator
public boolean getIsLinkingOperator() -
delete
public void delete() -
replaceWith
This method replaces the current TokenTree with a new TokenTree. -
getFeatureConnectionOpType
This method selects the the connection operator type based on the type of the (linking) token. If the type is not specified for the linking node, The default is Required. It returns null if the node is termainl node. -
getPriority
public int getPriority()This methods returens the priority of a node to move down in the binary tree. high priority node moves down & low prioriy moves up not > and > xor > or > ROOT (Top of the tree) -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-