Package eu.bandm.music.entities
Class PitchAndOctave<O extends Entity & Comparable<O>,C extends Entity & PitchIndication & Comparable<C>>
java.lang.Object
eu.bandm.music.entities.PitchAndOctave<O,C>
- All Implemented Interfaces:
PitchIndication
,Comparable<PitchAndOctave<O,
C>>
- Direct Known Subclasses:
FunctionalPitch
public class PitchAndOctave<O extends Entity & Comparable<O>,C extends Entity & PitchIndication & Comparable<C>>
extends Object
implements PitchIndication, Comparable<PitchAndOctave<O,C>>
A pitch indication which combines some octave register information
and some pitch class modulo octave.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PitchAndOctave<O, C> other) Evidentboolean
return the pitch class coordinatereturn the octave coordinatetoString()
Return text representation with the given language preferences.static <OO extends Entity & Comparable<OO>,
CC extends Entity & PitchIndication & Comparable<CC>>
PitchAndOctavevalueOf
(OO octave, CC classModOctave)
-
Field Details
-
octave
The octave coordinate of this pitch. -
classModOctave
The octave-relative coordinate (="pitch class" = "pitch mod octave") of this pitch.
-
-
Constructor Details
-
PitchAndOctave
Only constructor.
-
-
Method Details
-
valueOf
public static <OO extends Entity & Comparable<OO>,CC extends Entity & PitchIndication & Comparable<CC>> PitchAndOctave valueOf(OO octave, CC classModOctave) -
equals
-
compareTo
Evident- Specified by:
compareTo
in interfaceComparable<O extends Entity & Comparable<O>>
-
get_octave
return the octave coordinate -
get_classModOctave
return the pitch class coordinate -
toString
Return text representation with the given language preferences. -
toString
-