| Modifier and Type | Class and Description |
|---|---|
static class |
Node.Acceptance
Enum of Acceptance values
|
| Modifier and Type | Field and Description |
|---|---|
protected List<Node> |
childs
Contains the list of children
|
protected int |
color
other Color of the node
|
protected static int |
colors
Color of node
|
String |
id
Node Id
|
Double |
param1
Acceptance Threshold
|
Double |
param2
Verification Threshold
|
protected Node |
parent
Parent of the node
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsChild(Node n)
Returns true if Child will be accepted
|
Node.Acceptance |
acceptsChildWithReason(Node n)
Gives the Reason why Child is not accepted
|
boolean |
addChild(Node child)
Adds a Child to the Node
|
static Node |
createNode(String id)
Create new Node
|
boolean |
equals(Object o)
Compares Object and this Node
|
boolean |
equals(Object o,
boolean strict)
Test if Object and Node are the same
|
List<Node> |
getChilds()
Returns the List of children
|
byte |
getMaxChilds()
Returns the maxmimum number of children of the node
|
boolean |
hasFrontParameters()
Returns true if node has FrontParameters
|
abstract Set<String> |
identifiers()
Returns the valid identifiers of the Node
|
boolean |
isComplete()
Tests if Node has all needed Children
|
boolean |
isValidParentOf(Node node)
Returns if node can be a parent of this specific node
|
void |
overwriteParent(Node parent)
set a New Parent to this Node
|
protected void |
pushDownColor(int color)
Changes Color of Node and children
|
void |
removeChild(Node child)
Removes child from node
|
void |
removeParent()
Set the Parent of this Node to Null
|
String |
toString()
Builds MetricExpressionString
|
abstract Set<Class<? extends Node>> |
validChildClasses()
Valid accepted Child classes of the node
|
protected static int colors
public final String id
public Double param1
public Double param2
protected int color
protected Node parent
public Node(String id)
id - Identifier of the Nodepublic static Node createNode(String id)
id - Identifier of new Nodepublic abstract Set<String> identifiers()
public byte getMaxChilds()
public abstract Set<Class<? extends Node>> validChildClasses()
public final boolean isValidParentOf(Node node)
node - To be tested nodepublic boolean addChild(Node child)
child - Child to be addedpublic void removeChild(Node child)
child - to be removedpublic boolean acceptsChild(Node n)
n - node to testpublic Node.Acceptance acceptsChildWithReason(Node n)
n - node to be testedpublic boolean isComplete()
protected void pushDownColor(int color)
color - public boolean hasFrontParameters()
public boolean equals(Object o)
public boolean equals(Object o, boolean strict)
o - Tested Objectstrict - If True test String and Parentspublic void removeParent()
public void overwriteParent(Node parent)
parent - New ParentCopyright © 2019. All rights reserved.