public final class Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.util.List<Node> |
children
The child nodes; empty when leaf.
|
(package private) double |
cumulativeWeight
The cumulative weight for all contributions.
|
private AggregatableFrame |
frame
The frame associated with this node.
|
private java.lang.Integer |
nodeId
Integer uniquely identifying this node within our data structure.
|
(package private) Node |
parent
The parent node; null when root.
|
(package private) double |
weight
The weight when being the top frame.
|
Constructor and Description |
---|
Node(Node parent,
AggregatableFrame frame) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.Integer |
computeNodeId(Node parent,
AggregatableFrame frame) |
boolean |
equals(java.lang.Object obj) |
java.util.List<Node> |
getChildren() |
double |
getCumulativeWeight() |
AggregatableFrame |
getFrame() |
java.lang.Integer |
getNodeId() |
Node |
getParent() |
double |
getWeight() |
int |
hashCode() |
boolean |
isLeaf() |
boolean |
isRoot() |
static Node |
newRootNode(AggregatableFrame rootFrame) |
java.lang.String |
toString() |
private final java.lang.Integer nodeId
private final AggregatableFrame frame
double weight
Node parent
final java.util.List<Node> children
double cumulativeWeight
public Node(Node parent, AggregatableFrame frame)
public static Node newRootNode(AggregatableFrame rootFrame)
private static java.lang.Integer computeNodeId(Node parent, AggregatableFrame frame)
public java.lang.Integer getNodeId()
public double getWeight()
public double getCumulativeWeight()
public AggregatableFrame getFrame()
public java.util.List<Node> getChildren()
public Node getParent()
public boolean isRoot()
public boolean isLeaf()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object