The getLength() method in Node is final (not quite sure why), so cannot be overwritten.
Its implementation uses getParent().height - height to calculate the length.
Replacing this by getParent().getHeight() - getHeight() would allow classes derived from Node (like BinaryNode in the starbeast3 package) to implement its own heights on nodes.
The
getLength()
method inNode
is final (not quite sure why), so cannot be overwritten. Its implementation usesgetParent().height - height
to calculate the length. Replacing this bygetParent().getHeight() - getHeight()
would allow classes derived fromNode
(likeBinaryNode
in the starbeast3 package) to implement its own heights on nodes.