public enum Instrument extends Enum<Instrument>
Enum Constant and Description |
---|
BASS_DRUM
Bass drum note
|
BASS_GUITAR
Bass guitar note
|
PIANO
Piano note
|
SNARE_DRUM
Snare drum note
|
STICKS
Stick note
|
Modifier and Type | Method and Description |
---|---|
byte |
asByte()
Returns the
byte value of the Instrument |
static Instrument |
fromByte(byte b)
Resolves the Instrument from its respective Byte value
|
static Instrument |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Instrument[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Instrument PIANO
public static final Instrument BASS_DRUM
public static final Instrument SNARE_DRUM
public static final Instrument STICKS
public static final Instrument BASS_GUITAR
public static Instrument[] values()
for (Instrument c : Instrument.values()) System.out.println(c);
public static Instrument valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Instrument fromByte(byte b)
b
- Byte representing the Instrumentpublic byte asByte()
byte
value of the InstrumentCopyright © 2016. All rights reserved.