com.baseprogramming.text
Enum Ordinals

java.lang.Object
  extended by java.lang.Enum<Ordinals>
      extended by com.baseprogramming.text.Ordinals
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Ordinals>

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

First 10 Ordinals--for convenience. Could be part of a general purpose numeric utility that spells numbers.


Enum Constant Summary
EIGHTH
           
FIFTH
           
FIRST
           
FOURTH
           
NINTH
           
SECOND
           
SEVENTH
           
SIXTH
           
TENTH
           
THIRD
           
 
Method Summary
 java.lang.String getLabel()
           
static Ordinals valueOf(int number)
           
static Ordinals valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Ordinals[] 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

FIRST

public static final Ordinals FIRST

SECOND

public static final Ordinals SECOND

THIRD

public static final Ordinals THIRD

FOURTH

public static final Ordinals FOURTH

FIFTH

public static final Ordinals FIFTH

SIXTH

public static final Ordinals SIXTH

SEVENTH

public static final Ordinals SEVENTH

EIGHTH

public static final Ordinals EIGHTH

NINTH

public static final Ordinals NINTH

TENTH

public static final Ordinals TENTH
Method Detail

values

public static Ordinals[] 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 (Ordinals c : Ordinals.values())
    System.out.println(c);

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

valueOf

public static Ordinals 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

getLabel

public java.lang.String getLabel()

valueOf

public static Ordinals valueOf(int number)