edu.nrao.sss.model.proposal
Enum ScientificType

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

public enum ScientificType
extends Enum<ScientificType>

An enumeration of scientific exploration types.

Since:
2006-03-03
Author:
David M. Harland

Enum Constant Summary
EXTRAGALACTIC
          Represents an extragalactic scientific exploration.
GALACTIC
          Represents a scientific exploration of something in our galaxy.
OTHER
          Represents a scientific exploration of a type other than those listed herein.
SOLAR_SYSTEM
          Represents a scientific exploration of something in the solar system.
STELLAR
          Represents a scientific exploration of a stellar object.
UNKNOWN
          Represents a scientific exploration of unknown type.
 
Method Summary
static ScientificType fromString(String text)
          Returns the scientific type represented by text.
static ScientificType getDefault()
          Returns a default scientific type.
 String toString()
          Returns a text representation of this enumeration constant.
static ScientificType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ScientificType[] 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

EXTRAGALACTIC

public static final ScientificType EXTRAGALACTIC
Represents an extragalactic scientific exploration.

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


SOLAR_SYSTEM

public static final ScientificType SOLAR_SYSTEM
Represents a scientific exploration of something in the solar system.

The acceptable names of this element (for use with getInstanceFromName(String)) are SOLAR_SYSTEM and Solar System.


GALACTIC

public static final ScientificType GALACTIC
Represents a scientific exploration of something in our galaxy.

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


STELLAR

public static final ScientificType STELLAR
Represents a scientific exploration of a stellar object.

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


OTHER

public static final ScientificType OTHER
Represents a scientific exploration of a type other than those listed herein.

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


UNKNOWN

public static final ScientificType UNKNOWN
Represents a scientific exploration of unknown type.

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

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

valueOf

public static ScientificType 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 ScientificType getDefault()
Returns a default scientific type.

Returns:
a default scientific type.

toString

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

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

fromString

public static ScientificType fromString(String text)
Returns the scientific type represented by text.

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

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


Copyright © 2009. All Rights Reserved.