|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ScientificPriority> edu.nrao.sss.model.project.ScientificPriority
public enum ScientificPriority
An enumeration of scientific priorities.
A lower number represents a higher priority.
Enum Constant Summary | |
---|---|
FOUR
The lowest priority (except for that of the UNKNOWN priority). |
|
ONE
An intermediate priority that is lower than ZERO but higher
than TWO . |
|
THREE
An intermediate priority that is lower than TWO but higher
than FOUR . |
|
TWO
An intermediate priority that is lower than ONE but higher
than THREE . |
|
UNKNOWN
Represents a scientific priority of unknown type. |
|
ZERO
The highest priority. |
Method Summary | |
---|---|
static ScientificPriority |
fromString(String text)
Returns the scientific priority represented by text . |
static ScientificPriority |
getDefault()
Returns a default scientific priority. |
static EnumSet<ScientificPriority> |
getPrioritiesFor(TelescopeType telescope)
Returns a set of enumerations that is appropriate for the given telescope. |
boolean |
isHigherPriorityThan(ScientificPriority otherSciPri)
Returns true if this priority is higher (more important) than otherSciPri . |
char |
toChar()
Returns a single character that represents this priority. |
int |
toInt()
Returns a numeric representation of this priority. |
String |
toString()
|
String |
toString(TelescopeType telescope)
Returns a text representation of this priority that is appropriate for the given telescope. |
static ScientificPriority |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ScientificPriority[] |
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 |
---|
public static final ScientificPriority ZERO
The acceptable names of this element (for use with
getInstanceFromName(String)
) are
ZERO, 0, and A.
public static final ScientificPriority ONE
ZERO
but higher
than TWO
.
The acceptable names of this element (for use with
getInstanceFromName(String)
) are
ONE, 1, and B.
public static final ScientificPriority TWO
ONE
but higher
than THREE
.
The acceptable names of this element (for use with
getInstanceFromName(String)
) are
TWO, 2, and C.
public static final ScientificPriority THREE
TWO
but higher
than FOUR
.
The acceptable names of this element (for use with
getInstanceFromName(String)
) are
THREE, 3, and D.
public static final ScientificPriority FOUR
UNKNOWN
priority).
The acceptable names of this element (for use with
getInstanceFromName(String)
) are
FOUR, 4, and E.
public static final ScientificPriority UNKNOWN
This priority is lower than all others.
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 |
---|
public static ScientificPriority[] values()
for (ScientificPriority c : ScientificPriority.values()) System.out.println(c);
public static ScientificPriority valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic int toInt()
public char toChar()
public String toString(TelescopeType telescope)
TelescopeType.GBT
, this is a single alphabetic
character. Otherwise, this is an integer.
telescope
- the telescope for which a text representation
of this priority is desired.
public String toString()
toString
in class Enum<ScientificPriority>
public boolean isHigherPriorityThan(ScientificPriority otherSciPri)
otherSciPri
.
otherSciPri
- the other priority to which this one is compared.
otherSciPri
.public static EnumSet<ScientificPriority> getPrioritiesFor(TelescopeType telescope)
Since GBT uses only the priorities A, B, and C, only the priorities
with these toChar()
properties are contained in the set.
Otherwise, all priorities except for the UNKNOWN
priority
are in the returned set.
telescope
- the telescope for which a set of priorities is needed.
public static ScientificPriority getDefault()
public static ScientificPriority fromString(String text)
text
.
For details about the transformation, see
EnumerationUtility.enumFromString(Class, String)
.
text
- a text representation of a scientific priority.
text
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |