org.jaudiotagger.tag.reference
Enum MusicalKey

java.lang.Object
  extended by java.lang.Enum<MusicalKey>
      extended by org.jaudiotagger.tag.reference.MusicalKey
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MusicalKey>

public enum MusicalKey
extends java.lang.Enum<MusicalKey>

Musical key used by the Key tagFieldKey It is not enforced but can be used to verify the Musical key according to the ID3 specification of the TKEY field


Enum Constant Summary
FLAT
           
MINOR
           
NOTE_A
           
NOTE_B
           
NOTE_C
           
NOTE_D
           
NOTE_E
           
NOTE_F
           
NOTE_G
           
OFF_KEY
           
SHARP
           
 
Field Summary
private static java.util.HashMap<java.lang.String,MusicalKey> groundKeyMap
           
private static java.util.HashMap<java.lang.String,MusicalKey> halfKeyMap
           
private static int MAX_KEY_LENGTH
           
private  java.lang.String value
           
 
Method Summary
 java.lang.String getValue()
           
static boolean isValid(java.lang.String musicalKey)
           
static MusicalKey valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MusicalKey[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
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

NOTE_A

public static final MusicalKey NOTE_A

NOTE_B

public static final MusicalKey NOTE_B

NOTE_C

public static final MusicalKey NOTE_C

NOTE_D

public static final MusicalKey NOTE_D

NOTE_E

public static final MusicalKey NOTE_E

NOTE_F

public static final MusicalKey NOTE_F

NOTE_G

public static final MusicalKey NOTE_G

FLAT

public static final MusicalKey FLAT

SHARP

public static final MusicalKey SHARP

MINOR

public static final MusicalKey MINOR

OFF_KEY

public static final MusicalKey OFF_KEY
Field Detail

value

private java.lang.String value

MAX_KEY_LENGTH

private static final int MAX_KEY_LENGTH
See Also:
Constant Field Values

groundKeyMap

private static final java.util.HashMap<java.lang.String,MusicalKey> groundKeyMap

halfKeyMap

private static final java.util.HashMap<java.lang.String,MusicalKey> halfKeyMap
Method Detail

values

public static MusicalKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MusicalKey c : MusicalKey.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MusicalKey valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getValue

public java.lang.String getValue()

isValid

public static boolean isValid(java.lang.String musicalKey)