Modifier and Type | Field and Description |
---|---|
static int |
LEAF_DEFAULT_DEPTH |
static long |
nextUid |
static int |
PADDING_HORIZONTAL |
static int |
PADDING_VERTICAL |
static byte |
SKIPPED
The value should be -42 if the node is skipped and added in the tree.
|
static byte |
TYPE_BRANCH |
static byte |
TYPE_LEAF |
Constructor and Description |
---|
TreeNode(String label,
int depth,
int width,
byte type)
Create a new TreeNode with a default value of -1
|
TreeNode(String label,
int depth,
int width,
byte type,
byte value) |
TreeNode(TreeNode other)
Create a new TreeNode by copying the values of the other TreeNode
|
Modifier and Type | Method and Description |
---|---|
TreeNode |
deepCopy(Tree gm) |
boolean |
equals(Object other) |
int |
getDepth() |
String |
getLabel() |
byte |
getType() |
long |
getUniqueId() |
byte |
getValue() |
int |
getWidth() |
boolean |
isBranch() |
boolean |
isLeaf() |
void |
setDepth(int depth) |
void |
setLabel(String label) |
void |
setWidth(int width) |
String |
toDescrString() |
String |
toDot()
Return a dot representation of the object as a String
|
String |
toDot(Object to)
Return a dot representation of the edge as a String
The object is the source of the edge, the first parameter is the target.
|
String |
toString() |
String |
toUniqueString() |
public static long nextUid
public static final byte TYPE_LEAF
public static final byte TYPE_BRANCH
public static final int PADDING_VERTICAL
public static final int PADDING_HORIZONTAL
public static final int LEAF_DEFAULT_DEPTH
public static final byte SKIPPED
public TreeNode(String label, int depth, int width, byte type)
label
- depth
- the depth in the treewidth
- type
- public TreeNode(String label, int depth, int width, byte type, byte value)
public TreeNode(TreeNode other)
other
- public boolean isLeaf()
public boolean isBranch()
public byte getValue()
public byte getType()
public void setLabel(String label)
public String getLabel()
public long getUniqueId()
public void setDepth(int depth)
public int getDepth()
public void setWidth(int width)
public int getWidth()
public String toUniqueString()
public String toDescrString()
public String toDot()
Dotify
public String toDot(Object to)
Dotify
Copyright © 2005–2020. All rights reserved.