| java.lang.Object org.cougaar.core.adaptivity.OMCBase
All known Subclasses: org.cougaar.core.adaptivity.InterAgentCondition, org.cougaar.core.adaptivity.SensorCondition, org.cougaar.core.adaptivity.OperatingModeImpl,
OMCBase | public class OMCBase implements java.io.Serializable(Code) | | The base class for OperatingMode and Condition implementations.
These two concepts differ only in that an OperatingMode can be set
by the AdaptivityEngine whereas a Condition is under the
control of the component establishing the Condition.
|
Constructor Summary | |
protected | OMCBase(String name, OMCRangeList allowedValues) Constructor using default initial value.
Parameters: name - the name of this Parameters: allowedValues - the allowed value ranges. | protected | OMCBase(String name, OMCRangeList allowedValues, Comparable initialValue) Constructor with a specific initialvalue.
Parameters: name - the name of this Parameters: allowedValues - the allowed value ranges. |
OMCBase | protected OMCBase(String name, OMCRangeList allowedValues)(Code) | | Constructor using default initial value.
Parameters: name - the name of this Parameters: allowedValues - the allowed value ranges. It is illegal toset a value that is not in the allowed ranges. |
OMCBase | protected OMCBase(String name, OMCRangeList allowedValues, Comparable initialValue)(Code) | | Constructor with a specific initialvalue.
Parameters: name - the name of this Parameters: allowedValues - the allowed value ranges. It is illegal toset a value that is not in the allowed ranges. Parameters: initialValue - the initial value. Must not be null. Allsubsequent values that are set for this must have the same classas the initial value. |
getAllowedValues | public OMCRangeList getAllowedValues()(Code) | | Gets the list if allowed value ranges. The allowed value ranges
are set in the constructor and immutable thereafter.
the list of allowed value ranges. |
getValue | public Comparable getValue()(Code) | | Gets the current value
the current value |
setValue | protected void setValue(Comparable newValue)(Code) | | Set a new value for this. The new value must be in the list of
allowed value ranges. This method is protected because the
ability to set a new value must be under the control of a
responsible component. Subclasses will override this with public
or package protected versions as needed.
Parameters: newValue - the new value. Must be an allowed value. |
toString | public String toString()(Code) | | Furnish a useful string representation.
the name and value separated by an equals sign. |
|
|