public class Measure extends java.lang.Object implements java.lang.Comparable<Measure>, java.io.Serializable
Measure represents a metrical measure, containing information about the number of
beats per measure, as well as the number of sub beats per beat.| Modifier and Type | Field and Description |
|---|---|
private int |
beatsPerMeasure
The number of beats this measure is divided into in the grammar.
|
private static long |
serialVersionUID
Version 1
|
private int |
subBeatsPerBeat
The number of sub-beats each beat of this measure
is divided into in the grammar.
|
| Constructor and Description |
|---|
Measure(int beatsPerMeasure,
int subBeatsPerBeat)
Create a new Measure with the given fields.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Measure o) |
boolean |
equals(java.lang.Object o) |
int |
getBeatsPerMeasure()
Get the number of beats this measure is divided into.
|
int |
getSubBeatsPerBeat()
Get the number of sub-beats each beat of this measure
is divided into.
|
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
private final int beatsPerMeasure
private final int subBeatsPerBeat
public Measure(int beatsPerMeasure,
int subBeatsPerBeat)
beatsPerMeasure - beatsPerMeasuresubBeatsPerBeat - subBeatsPerBeatpublic int getBeatsPerMeasure()
beatsPerMeasurepublic int getSubBeatsPerBeat()
subBeatsPerBeatpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object