Bukkit  1.5.2-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.Note Class Reference

A note class to store a specific note. More...

Classes

enum  Tone
 An enum holding tones. More...
 

Public Member Functions

 Note (int note)
 Creates a new note.
 
 Note (int octave, Tone tone, boolean sharped)
 Creates a new note.
 
Note sharped ()
 
Note flattened ()
 
byte getId ()
 Returns the internal id of this note.
 
int getOctave ()
 Returns the octave of this note.
 
Tone getTone ()
 Returns the tone of this note.
 
boolean isSharped ()
 Returns if this note is sharped.
 
int hashCode ()
 
boolean equals (Object obj)
 
String toString ()
 

Static Public Member Functions

static Note flat (int octave, Tone tone)
 Creates a new note for a flat tone, such as A-flat.
 
static Note sharp (int octave, Tone tone)
 Creates a new note for a sharp tone, such as A-sharp.
 
static Note natural (int octave, Tone tone)
 Creates a new note for a natural tone, such as A-natural.
 

Detailed Description

A note class to store a specific note.

Definition at line 12 of file Note.java.

Constructor & Destructor Documentation

org.bukkit.Note.Note ( int  note)

Creates a new note.

Parameters
noteInternal note id. getId() always return this value. The value has to be in the interval [0; 24].

Definition at line 119 of file Note.java.

Referenced by org.bukkit.Note.equals(), org.bukkit.Note.flat(), org.bukkit.Note.flattened(), org.bukkit.Note.natural(), org.bukkit.Note.sharp(), and org.bukkit.Note.sharped().

org.bukkit.Note.Note ( int  octave,
Tone  tone,
boolean  sharped 
)

Creates a new note.

Parameters
octaveThe octave where the note is in. Has to be 0 - 2.
toneThe tone within the octave. If the octave is 2 the note has to be F#.
sharpedSet if the tone is sharped (e.g. for F#).

Definition at line 132 of file Note.java.

References org.bukkit.Note.Tone.F, org.bukkit.Note.Tone.getId(), org.bukkit.Note.Tone.isSharpable(), and org.bukkit.Note.Tone.TONES_COUNT.

Member Function Documentation

boolean org.bukkit.Note.equals ( Object  obj)

Definition at line 246 of file Note.java.

References org.bukkit.Note.Note().

static Note org.bukkit.Note.flat ( int  octave,
Tone  tone 
)
static

Creates a new note for a flat tone, such as A-flat.

Parameters
octaveThe octave where the note is in. Has to be 0 - 1.
toneThe tone within the octave.
Returns
The new note.

Definition at line 151 of file Note.java.

References org.bukkit.Note.Tone.F, org.bukkit.Note.Tone.G, org.bukkit.Note.Tone.isSharpable(), and org.bukkit.Note.Note().

Note org.bukkit.Note.flattened ( )
Returns
The note a semitone below this one.

Definition at line 191 of file Note.java.

References org.bukkit.Note.Note().

byte org.bukkit.Note.getId ( )

Returns the internal id of this note.

Returns
the internal id of this note.

Definition at line 201 of file Note.java.

Referenced by org.bukkit.Note.Tone.getId(), and org.bukkit.Note.Tone.isSharped().

int org.bukkit.Note.getOctave ( )

Returns the octave of this note.

Returns
the octave of this note.

Definition at line 210 of file Note.java.

References org.bukkit.Note.Tone.TONES_COUNT.

Tone org.bukkit.Note.getTone ( )

Returns the tone of this note.

Returns
the tone of this note.

Definition at line 223 of file Note.java.

References org.bukkit.Note.Tone.getById().

Referenced by org.bukkit.Note.toString().

int org.bukkit.Note.hashCode ( )

Definition at line 238 of file Note.java.

boolean org.bukkit.Note.isSharped ( )

Returns if this note is sharped.

Returns
if this note is sharped.

Definition at line 232 of file Note.java.

References org.bukkit.Note.Tone.getById(), and org.bukkit.Note.Tone.isSharped().

Referenced by org.bukkit.Note.toString().

static Note org.bukkit.Note.natural ( int  octave,
Tone  tone 
)
static

Creates a new note for a natural tone, such as A-natural.

Parameters
octaveThe octave where the note is in. Has to be 0 - 1.
toneThe tone within the octave.
Returns
The new note.

Definition at line 175 of file Note.java.

References org.bukkit.Note.Note().

static Note org.bukkit.Note.sharp ( int  octave,
Tone  tone 
)
static

Creates a new note for a sharp tone, such as A-sharp.

Parameters
octaveThe octave where the note is in. Has to be 0 - 2.
toneThe tone within the octave. If the octave is 2 the note has to be F#.
Returns
The new note.

Definition at line 164 of file Note.java.

References org.bukkit.Note.Note().

Note org.bukkit.Note.sharped ( )
Returns
The note a semitone above this one.

Definition at line 183 of file Note.java.

References org.bukkit.Note.Note().

String org.bukkit.Note.toString ( )

Definition at line 260 of file Note.java.

References org.bukkit.Note.getTone(), and org.bukkit.Note.isSharped().


The documentation for this class was generated from the following file: