|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.Note
public class Note
A note class to store a specific note.
Nested Class Summary | |
---|---|
static class |
Note.Tone
An enum holding tones. |
Constructor Summary | |
---|---|
Note(int note)
Creates a new note. |
|
Note(int octave,
Note.Tone tone,
boolean sharped)
Creates a new note. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
static Note |
flat(int octave,
Note.Tone tone)
Creates a new note for a flat tone, such as A-flat. |
Note |
flattened()
|
byte |
getId()
Deprecated. Magic value |
int |
getOctave()
Returns the octave of this note. |
Note.Tone |
getTone()
Returns the tone of this note. |
int |
hashCode()
|
boolean |
isSharped()
Returns if this note is sharped. |
static Note |
natural(int octave,
Note.Tone tone)
Creates a new note for a natural tone, such as A-natural. |
static Note |
sharp(int octave,
Note.Tone tone)
Creates a new note for a sharp tone, such as A-sharp. |
Note |
sharped()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Note(int note)
note
- Internal note id. getId()
always return this value.
The value has to be in the interval [0; 24].public Note(int octave, Note.Tone tone, boolean sharped)
octave
- The octave where the note is in. Has to be 0 - 2.tone
- The tone within the octave. If the octave is 2 the note has to be F#.sharped
- Set if the tone is sharped (e.g. for F#).Method Detail |
---|
public static Note flat(int octave, Note.Tone tone)
octave
- The octave where the note is in. Has to be 0 - 1.tone
- The tone within the octave.
public static Note sharp(int octave, Note.Tone tone)
octave
- The octave where the note is in. Has to be 0 - 2.tone
- The tone within the octave. If the octave is 2 the note has to be F#.
public static Note natural(int octave, Note.Tone tone)
octave
- The octave where the note is in. Has to be 0 - 1.tone
- The tone within the octave.
public Note sharped()
public Note flattened()
@Deprecated public byte getId()
public int getOctave()
public Note.Tone getTone()
public boolean isSharped()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |