|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<EventSetStatus> edu.nrao.sss.util.EventSetStatus
public enum EventSetStatus
An indicator for where a collection of events is in its life cycle.
This enumeration is appropriate for the status of an event that is really a collection of finer grained events. For the most part, the statuses of an atomic event and an event that is a collection of atomic events, overlap. The one place they differ is in their treatments of "in progress" and "under way".
See also EventStatus
.
Version Info:
$Revision: 2184 $ |
$Date: 2009-04-10 15:00:07 -0600 (Fri, 10 Apr 2009) $ |
$Author: dharland $ (last person to modify) |
Enum Constant Summary | |
---|---|
CANCELED
Indicates that an entire set of events has been canceled. |
|
COMPLETED
Indicates that a set of events has been completed. |
|
IN_PROGRESS
Indicates that at least one event in a set is currently in progress, but says nothing about the other events in that set. |
|
NOT_READY_TO_BE_SCHEDULED
Indicates that no event in a set is ready for scheduling. |
|
NOT_YET_SCHEDULED
Indicates that no event in a set has been scheduled yet. |
|
ON_HOLD
Indicates that at least one event in a set has been put on hold and that none are currently in progress. |
|
SCHEDULED_BUT_NOT_STARTED
Indicates that no event in a set has begun yet, but that at least one has been scheduled. |
|
UNDER_WAY
Indicates that at least one, but not all, of the events in a set has reached the end of its life cycle. |
Method Summary | |
---|---|
static EventSetStatus |
createFrom(EventSetStatus... componentStatuses)
Uses the componentStatuses to derive a single
EventSetStatus. |
static EventSetStatus |
createFrom(EventStatus... componentStatuses)
Uses the componentStatuses to derive an EventSetStatus. |
static EventSetStatus |
fromString(String text)
Returns the status represented by text . |
boolean |
isFinal()
Returns true if this status is a final status for an event. |
String |
toString()
Returns a text representation of this enumeration constant. |
static EventSetStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static EventSetStatus[] |
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 EventSetStatus NOT_READY_TO_BE_SCHEDULED
public static final EventSetStatus NOT_YET_SCHEDULED
public static final EventSetStatus SCHEDULED_BUT_NOT_STARTED
public static final EventSetStatus IN_PROGRESS
This status should be used only when an activity really is in progress.
One place where this is ambiguous is as follows. Imagine that we
have a container that has a collection of components. Each component
has an execution status, as does the container. The execution status
of the container, though, is derived from that of its components.
Imagine that some of the components have been completed and that the
rest of them have not yet begun. One could say that the container
is "in progress", as it has begun but not yet been completed.
However, we would really like to see this status used only when the
activity is really happening. Had one of the above components been
in progress and all others as stated above, then this status would be
appropriate for the container. However, as given in the example, a
better status would be UNDER_WAY
.
public static final EventSetStatus UNDER_WAY
public static final EventSetStatus COMPLETED
public static final EventSetStatus ON_HOLD
An actor must act to take an event out of this status. Note that this is subtly different than postponing an event, which places its status immediately back to NOT_YET_SCHEDULED.
public static final EventSetStatus CANCELED
Method Detail |
---|
public static EventSetStatus[] values()
for (EventSetStatus c : EventSetStatus.values()) System.out.println(c);
public static EventSetStatus 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 boolean isFinal()
public static EventSetStatus createFrom(EventStatus... componentStatuses)
componentStatuses
to derive an EventSetStatus.
This method is appropriate when your event holds a collection of events,
but the events that your event holds do not themselves hold other
events.
Some of the rules used by this method are as follows:
We reach the next items only if none of the above resulted in an answer.
componentStatuses
- a set of event statuses from which can be derived
a single status for a set of events.
public static EventSetStatus createFrom(EventSetStatus... componentStatuses)
componentStatuses
to derive a single
EventSetStatus. This method is appropriate when your event
holds a collection of events, each which also holds a collection of
events.
Some of the rules used by this method are as follows:
We reach the next items only if none of the above resulted in an answer.
componentStatuses
- a set of event set statuses from which can be
derived a single status for a set of events.
public String toString()
toString
in class Enum<EventSetStatus>
public static EventSetStatus fromString(String text)
text
.
For details about the transformation, see
EnumerationUtility.enumFromString(Class, String)
.
text
- a text representation of a status.
text
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |