public class IltLimitedNumericState extends IltNumericState implements Cloneable
MaxValue
and
MinValue
.
Instances of this class should only be set together with an associated value. The value can be any of the following types:
int
float
Number
int[]
long[]
float[]
double[]
Number[]
When instances of this class are created, it is possible to define default values, so that when a specific telecom object instance is created and uses a specific state model which contains this simple state, the default value is automatically assigned to the object.
Modifier and Type | Field and Description |
---|---|
static Float |
MaxValue
Maximum value
|
static IltStateInfo |
metainfo
Contains metainformation about this
IltLimitedNumericState class. |
static Float |
MinValue
Minimum value
|
Constructor and Description |
---|
IltLimitedNumericState()
Default constructor.
|
IltLimitedNumericState(String name,
String description,
Number defaultValue,
Number maxValue,
boolean useMax,
Number minValue,
boolean useMin)
Creates an
IltLimitedNumericState . |
IltLimitedNumericState(String name,
String description,
String message,
Number defaultValue,
Number maxValue,
boolean useMax,
Number minValue,
boolean useMin)
Creates an
IltLimitedNumericState . |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of this object.
|
void |
copy(IltState from)
Copy the values from the source state
|
Number |
getMaxValue()
Returns the maximum value for this state.
|
Number |
getMinValue()
Returns the minimum value for this state.
|
float |
getValue(Object value) |
float[] |
getValues(Object value) |
boolean |
isUsingMaxValue()
Returns whether or not this state is respecting the maximum value.
|
boolean |
isUsingMinValue()
Returns whether or not this state is respecting the minimum value.
|
boolean |
isValid(Object value)
This method verifies if the given value can be set in the state.
|
void |
list(IlpContext context,
IltStateListing listing,
Object value)
Generates a plain text listing of a state.
|
void |
setDefault(Object defaultValue)
Sets the default value of the state.
|
void |
setDescription(String description)
Sets a new description to the state.
|
void |
setMaxValue(Number limit)
Sets the maximum value for this state.
|
void |
setMessage(String message)
Sets the message of this object.
|
void |
setMinValue(Number limit)
Sets the minimum value for this state.
|
void |
setName(String name)
Sets the name of this object.
|
void |
setUsingMaxValue(boolean use)
Determines whether or not this state will respect the maximum value.
|
void |
setUsingMinValue(boolean use)
Determines whether or not this state will respect the minimum value.
|
getDouble, getToolTipText, getToolTipText
createValue, getDefault, hasDefault
CreateNameFilter, CreateStateFilter, equals, getAliases, getAllPaths, getAltName, getDescription, getName, getProperty, getStateInfo, hasDescription, hashCode, intern, isInside, IsPropertyTransient, removeProperty, setAltName, setProperty, SetPropertyTransient, toString
public static IltStateInfo metainfo
IltLimitedNumericState
class.public static Float MinValue
public static Float MaxValue
public IltLimitedNumericState(String name, String description, Number defaultValue, Number maxValue, boolean useMax, Number minValue, boolean useMin)
IltLimitedNumericState
.
This constructor creates a numeric state which may have values defined by an internal,
given by MinValue..MaxValue
.description
- An optional attribute which defines a textual description of the state.defaultValue
- An optional attribute which defines a default value for this state.maxValue
- Defines the maximum value for this state. It must be a non-null
value, or the limit will be 0
.useMax
- Determines whether the maximum value is respected.minValue
- Defines the minimum value for this state. It must be a non-null
value, or the limit will be 0
.useMin
- Determines whether the minimum value is respected.public IltLimitedNumericState(String name, String description, String message, Number defaultValue, Number maxValue, boolean useMax, Number minValue, boolean useMin)
IltLimitedNumericState
.
This constructor creates a numeric state which may have values defined by an internal,
given by MinValue..MaxValue
.description
- An optional attribute which defines a textual description of the state.message
- Identifies a catalog message which is used as the state description. If this
value is set, the description argument is used as a default value in case the message is
not found in the catalog.defaultValue
- An optional attribute which defines a default value for this state.maxValue
- Defines the maximum value for this state. It must be a non-null
value, or the limit will be 0
.useMax
- Determines whether the maximum value is respected.minValue
- Defines the minimum value for this state. It must be a non-null
value, or the limit will be 0
.useMin
- Determines whether the minimum value is respected.public IltLimitedNumericState()
public void setName(String name)
public void setDescription(String description)
IltState
The description is displayed as tooltip when the state is graphically represented in the object as a secondary state.
setDescription
in class IltState
public void setMessage(String message)
setMessage
in class IltState
public void setDefault(Object defaultValue)
IltSimpleState
setDefault
in class IltSimpleState
public Number getMinValue()
public void setMinValue(Number limit)
public Number getMaxValue()
public void setMaxValue(Number limit)
limit
- The maximum value this state can be assigned.public boolean isUsingMaxValue()
public void setUsingMaxValue(boolean use)
use
- Flag which indicates whether the maximum limit will be respected.public boolean isUsingMinValue()
public void setUsingMinValue(boolean use)
use
- Flag which indicates whether the minimum limit will be respected.public void copy(IltState from)
public void list(IlpContext context, IltStateListing listing, Object value)
list
in class IltNumericState
public boolean isValid(Object value)
true
.isValid
in class IltNumericState
public Object clone()
public float getValue(Object value)
public float[] getValues(Object value)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.