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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PitchAndOctave<O, C> other) Evidentboolean
return the pitch class coordinateReturn the octave coordinateDelivers the composed name, only in the given language.static <OCT extends Entity & Comparable<OCT>,
PC extends Entity & PitchIndication & Comparable<PC>>
Translet.Parser<PitchAndOctave<OCT, PC>> parser
(Translet.Parser<PC> pc, Translet.Parser<OCT> oct) Deliver a parser which combines both given parsers.toString()
Return text representation with the given language preferences.static <OO extends Entity & Comparable<OO>,
CC extends Entity & PitchIndication & Comparable<CC>>
PitchAndOctave<OO, CC> valueOf
(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<OO,CC> 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
-
getName
-
getName
Delivers the composed name, only in the given language. -
parser
public static <OCT extends Entity & Comparable<OCT>,PC extends Entity & PitchIndication & Comparable<PC>> Translet.Parser<PitchAndOctave<OCT,PC>> parser(Translet.Parser<PC> pc, Translet.Parser<OCT> oct) Deliver a parser which combines both given parsers.
-