ritornello.core.conceitual
Class PitchName

java.lang.Object
  |
  +--ritornello.core.conceitual.PitchName
All Implemented Interfaces:
Rollable

public class PitchName
extends java.lang.Object
implements Rollable


Field Summary
static int DO
          The DO note value.
static int FA
          The FA note value.
static int LA
          The LA note value.
static int MI
          The MI note value.
static int NUMBER_OF_PITCH_NAMES
          The number of pitch names.
static int RE
          The RE note value.
static int SI
          The SI note value.
static int SOL
          The SOL note value.
 
Constructor Summary
PitchName(int value)
          Constructor.
 
Method Summary
 int getBack()
          Returns the last element.
 java.lang.String getName()
          Retrieves the pitch name's name.
 int getNext()
          Returns the next element.
 int getValue()
          Retrieves the pitch name value for a note.
 int goTo(int amount)
          Go to an sequencial position foward or back, given its amount of steps.
 void setValue(int value)
          Sets the pitch name value for a note.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DO

public static final int DO
The DO note value.

See Also:
Constant Field Values

RE

public static final int RE
The RE note value.

See Also:
Constant Field Values

MI

public static final int MI
The MI note value.

See Also:
Constant Field Values

FA

public static final int FA
The FA note value.

See Also:
Constant Field Values

SOL

public static final int SOL
The SOL note value.

See Also:
Constant Field Values

LA

public static final int LA
The LA note value.

See Also:
Constant Field Values

SI

public static final int SI
The SI note value.

See Also:
Constant Field Values

NUMBER_OF_PITCH_NAMES

public static final int NUMBER_OF_PITCH_NAMES
The number of pitch names.

See Also:
Constant Field Values
Constructor Detail

PitchName

public PitchName(int value)
          throws ValidationException
Constructor. Sets the pitch name value.

Parameters:
value - - A pitch name note representation (e.g. DO = 1, RE = 2, ...., SI = 7).
Throws:
ValidationException
Method Detail

getValue

public int getValue()
Retrieves the pitch name value for a note.

Returns:
int

setValue

public void setValue(int value)
              throws ValidationException
Sets the pitch name value for a note.

Parameters:
value - - A note's pitch name representation (e.g. DO = 1, RE = 2, ...., SI = 7).
Throws:
ValidationException

getName

public java.lang.String getName()
Retrieves the pitch name's name.

Returns:
String

getNext

public int getNext()
Description copied from interface: Rollable
Returns the next element.

Specified by:
getNext in interface Rollable
Returns:
int

getBack

public int getBack()
Description copied from interface: Rollable
Returns the last element.

Specified by:
getBack in interface Rollable
Returns:
int

goTo

public int goTo(int amount)
Description copied from interface: Rollable
Go to an sequencial position foward or back, given its amount of steps.

Specified by:
goTo in interface Rollable
Parameters:
amount -
Returns:
int