edu.nrao.sss.model.project.scan
Enum PositionType

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

public enum PositionType
extends Enum<PositionType>

An indicator for interpreting a position as either absolute or relative.

CVS Info:

$Revision: 161 $
$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $
$Author: btruitt $

Since:
2006-09-08
Author:
David M. Harland

Enum Constant Summary
ABSOLUTE
          Indicates that a position is an absolute position.
OFFSET
          Indicates that a position is relative to, or offset from, another position.
 
Method Summary
static PositionType fromString(String text)
          Returns the position type represented by text.
static PositionType getDefault()
          Returns the default position type.
 String toString()
          Returns a text representation of this enumeration constant.
static PositionType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PositionType[] 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

ABSOLUTE

public static final PositionType ABSOLUTE
Indicates that a position is an absolute position.


OFFSET

public static final PositionType OFFSET
Indicates that a position is relative to, or offset from, another position.

Method Detail

values

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

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

valueOf

public static PositionType 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 PositionType getDefault()
Returns the default position type.

Returns:
the default position type.

toString

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

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

fromString

public static PositionType fromString(String text)
Returns the position type represented by text.

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

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


Copyright © 2009. All Rights Reserved.