edu.nrao.sss.model.proposal
Enum SupportType

java.lang.Object
  extended by java.lang.Enum<SupportType>
      extended by edu.nrao.sss.model.proposal.SupportType
All Implemented Interfaces:
Serializable, Comparable<SupportType>

public enum SupportType
extends Enum<SupportType>

Placeholder for time when we integrate proposal work. An enumeration of the levels of support that an observer might need from NRAO.

Since:
2006-03-03
Version:
1.1

Enum Constant Summary
CONSULTATION
          Signifies that an observer would like to consult with NRAO about their project.
FRIEND
          Signifies that an observer would like to have NRAO heavily involved with their project.
NONE
          Signifies that an observer needs no help from NRAO with their project.
UNKNOWN
          Signifies that the observer's need for support is unknown.
 
Method Summary
static SupportType fromString(String text)
          Returns the support type represented by text.
static SupportType getDefault()
          Returns a default support type.
 String toString()
          Returns a text representation of this enumeration constant.
static SupportType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SupportType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final SupportType NONE
Signifies that an observer needs no help from NRAO with their project.

The name of this element (for use with getInstanceFromName(String)) is NONE.


CONSULTATION

public static final SupportType CONSULTATION
Signifies that an observer would like to consult with NRAO about their project.

The name of this element (for use with getInstanceFromName(String)) is CONSULTATION.


FRIEND

public static final SupportType FRIEND
Signifies that an observer would like to have NRAO heavily involved with their project.

The name of this element (for use with getInstanceFromName(String)) is FRIEND.


UNKNOWN

public static final SupportType UNKNOWN
Signifies that the observer's need for support is unknown.

This element is used to implement the Null Object Pattern. In situations where a method might be tempted to return null, this element is returned instead.

Method Detail

values

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

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

valueOf

public static SupportType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getDefault

public static SupportType getDefault()
Returns a default support type.

Returns:
a default support type.

toString

public String toString()
Returns a text representation of this enumeration constant.

Overrides:
toString in class Enum<SupportType>
Returns:
a text representation of this enumeration constant.

fromString

public static SupportType fromString(String text)
Returns the support type represented by text.

For details about the transformation, see EnumerationUtility.enumFromString(Class, String).

Parameters:
text - a text representation of a support type.
Returns:
the support type represented by text.


Copyright © 2009. All Rights Reserved.