|
Opus+ Version 1.0 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<DrumKitId>
opusplus.core.constants.DrumKitId
public enum DrumKitId
This enum uniquely identifies commonly used drum kits.
Enum Constant Summary | |
---|---|
CYMBALS_DRUMKIT |
|
FULL_DRUMKIT |
|
METRONOME_CLICK_DRUMKIT |
|
METRONOME_HIHAT_DRUMKIT |
|
SNARE_BASS_HI_HAT_DRUMKIT |
Method Summary | |
---|---|
static boolean |
contains(DrumKitId[] arr, DrumKitId id) Returns true if the passed drum group array contains the drum group, otherwise false. |
int |
getValue() Returns the value associated of this enum |
static DrumKitId |
ordinalToEnum(int ordinal) Factory method that allows for the simple creation of enums from integers based on their declared position. |
DrumKitId |
perturb(IntegerStream is, int distancePercentage, int probabilityPercentage) Returns a 'randomly perturbed' enum based on the current value of 'this'. |
static int |
pos(DrumKitId[] arr, DrumKitId id) Returns the (zero based) index of the first occurrence of the passed DrumKitId within the passed array, or -1 if not found. |
static DrumKitId |
selectRandom(IntegerStream is) Returns one of these enums selected at random with equal probability as determined by the passed integer stream. |
static DrumKitId |
selectRandom(IntegerStream is, int[] weights) Returns one of these enums selected at random and biased according to the passed weights. |
DrumKitId |
selectRandomNeighbour(IntegerStream is) Returns a neighbouring enum at random based on the current value of 'this'. |
static int |
size() Returns the number of enum values of this type |
static DrumKitId |
valueOf(java.lang.String name) Returns the enum constant of this type with the specified name. |
static DrumKitId[] |
values() Returns an array containing the constants of this enum type, in the order they are declared. |
static DrumKitId |
valueToEnum(int value) Factory method that allows for the simple creation of enums from integers based on their actual value. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final DrumKitId SNARE_BASS_HI_HAT_DRUMKIT
public static final DrumKitId CYMBALS_DRUMKIT
public static final DrumKitId FULL_DRUMKIT
public static final DrumKitId METRONOME_CLICK_DRUMKIT
public static final DrumKitId METRONOME_HIHAT_DRUMKIT
Method Detail |
---|
public static DrumKitId[] values()
for (DrumKitId c : DrumKitId.values()) System.out.println(c);
public static DrumKitId valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic final int getValue()
public static DrumKitId valueToEnum(int value)
public static DrumKitId ordinalToEnum(int ordinal)
public static int size()
public static boolean contains(DrumKitId[] arr, DrumKitId id)
public static int pos(DrumKitId[] arr, DrumKitId id)
public static final DrumKitId selectRandom(IntegerStream is)
public static final DrumKitId selectRandom(IntegerStream is, int[] weights)
public final DrumKitId selectRandomNeighbour(IntegerStream is)
public final DrumKitId perturb(IntegerStream is, int distancePercentage, int probabilityPercentage)
|
Opus+ Version 1.0 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |