public class MetricalLpcfgTree
extends java.lang.Object
implements java.io.Serializable
MetricalLpcfgTree
represents the tree structure generated by a
metrical lpcfg for a single measure of a single voice of a song. The head of the
tree is stored in measure
.Modifier and Type | Field and Description |
---|---|
private MetricalLpcfgMeasure |
measure
The measure at the head of this tree.
|
private static long |
serialVersionUID
Version 1
|
Modifier | Constructor and Description |
---|---|
|
MetricalLpcfgTree(MetricalLpcfgMeasure measure)
Create a new tree with the given measure at its head.
|
private |
MetricalLpcfgTree(MetricalLpcfgTree tree)
Create a new tree as a deep copy of the given one.
|
Modifier and Type | Method and Description |
---|---|
MetricalLpcfgTree |
deepCopy()
Get a deep copy of this tree.
|
boolean |
equals(java.lang.Object o) |
MetricalLpcfgMeasure |
getMeasure()
Get the measure node which is at the head of this tree.
|
boolean |
isEmpty()
Get if this tree is empty or not.
|
boolean |
startsWithRest()
Get if this tree's first quantum is a rest or not.
|
java.lang.String |
toString() |
java.lang.String |
toStringPretty(java.lang.String tab)
Get the pretty, recursive version of this tree with the given indention String.
|
private static final long serialVersionUID
private final MetricalLpcfgMeasure measure
public MetricalLpcfgTree(MetricalLpcfgMeasure measure)
measure
- measure
private MetricalLpcfgTree(MetricalLpcfgTree tree)
tree
- The tree we want a deep copy of.public boolean isEmpty()
public boolean startsWithRest()
public MetricalLpcfgMeasure getMeasure()
measure
public MetricalLpcfgTree deepCopy()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringPretty(java.lang.String tab)
tab
- The String used to indent tree levels.