scheduler.model
Enum Medication.Shape

java.lang.Object
  extended by java.lang.Enum<Medication.Shape>
      extended by scheduler.model.Medication.Shape
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Medication.Shape>
Enclosing class:
Medication

public static enum Medication.Shape
extends java.lang.Enum<Medication.Shape>

Enumerated shape options for the description of a medication.


Enum Constant Summary
CAPSULE
           
ELLIPSOID
           
LARGE_CAPSULE
           
LARGE_ELLIPSOID
           
LARGE_ROUND
           
LARGE_TABLET
           
NONE
           
ROUND
           
SMALL_CAPSULE
           
SMALL_ELLIPSOID
           
SMALL_ROUND
           
SMALL_TABLET
           
TABLET
           
 
Method Summary
 int getNum()
          Returns the number associated with this shape.
static Medication.Shape getShapeFromInt(int i)
          Returns the Shape pertaining to the specified integer.
static Medication.Shape valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Medication.Shape[] 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

NONE

public static final Medication.Shape NONE

ROUND

public static final Medication.Shape ROUND

CAPSULE

public static final Medication.Shape CAPSULE

ELLIPSOID

public static final Medication.Shape ELLIPSOID

TABLET

public static final Medication.Shape TABLET

SMALL_ROUND

public static final Medication.Shape SMALL_ROUND

SMALL_CAPSULE

public static final Medication.Shape SMALL_CAPSULE

SMALL_ELLIPSOID

public static final Medication.Shape SMALL_ELLIPSOID

SMALL_TABLET

public static final Medication.Shape SMALL_TABLET

LARGE_ROUND

public static final Medication.Shape LARGE_ROUND

LARGE_CAPSULE

public static final Medication.Shape LARGE_CAPSULE

LARGE_ELLIPSOID

public static final Medication.Shape LARGE_ELLIPSOID

LARGE_TABLET

public static final Medication.Shape LARGE_TABLET
Method Detail

values

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

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

valueOf

public static Medication.Shape 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

getNum

public int getNum()
Returns the number associated with this shape.

Returns:
an integer uniquely identifying the shape

getShapeFromInt

public static Medication.Shape getShapeFromInt(int i)
Returns the Shape pertaining to the specified integer. Returns Shape.NONE if the integer has no matches.

Parameters:
i - the integer representation of a shape
Returns:
the Shape corresponding to i