public class StateBundle extends Object implements Serializable, Cloneable
| Constructor and Description |
|---|
StateBundle(Enum... states)
Construct a StateBundle from a set of states.
|
| Modifier and Type | Method and Description |
|---|---|
StateBundle |
clone() |
boolean |
equals(Object o)
MT: Commented out.
|
<T extends Enum<T>> |
getState(Class<T> enumClass)
Get the current value for a given State by providing the class of the
Enum representing the state.
|
int |
hashCode() |
boolean |
isInState(StateBundle stateBundle)
Check if this StateBundle is in all the states of a given StateBundle.
|
<T extends Enum<T>> |
isInState(T state)
Check if this StateBundle contains a given Enum state.
|
StateBundle |
mergeState(StateBundle newState)
Merge the content of two StateBundle objects returning an updated cloned
version of the original StateBundle object.
|
<T extends Enum<T>> |
setState(T state)
Set the value of a state in the form of an Enum value.
|
String |
toString() |
public StateBundle(Enum... states)
states - A set of states.public StateBundle mergeState(StateBundle newState)
newState - The StateBundle with the changes.public final <T extends Enum<T>> void setState(T state)
T - An enum that defines a set of states.state - The current value for the state.public final <T extends Enum<T>> Enum getState(Class<T> enumClass)
T - An enum that defines a set of states.enumClass - The class of the Enum representing the state.public <T extends Enum<T>> boolean isInState(T state)
T - An enum that defines a set of states.state - The value of the Enum to check.public boolean isInState(StateBundle stateBundle)
stateBundle - The StateBundle containing all the states to check.public boolean equals(Object o)
public StateBundle clone()
Copyright © 2015 LSST. All rights reserved.