ilog.tgo.model
Class IltLimitedNumericState

java.lang.Object
  extended by ilog.tgo.model.IltState
      extended by ilog.tgo.model.IltSimpleState
          extended by ilog.tgo.model.IltNumericState
              extended by ilog.tgo.model.IltLimitedNumericState
All Implemented Interfaces:
IltDecorationSource, IlWithProperties, Cloneable
Direct Known Subclasses:
IltPerformance.SecState, IltSAN.SecState

public class IltLimitedNumericState
extends IltNumericState
implements Cloneable

This class models states which can have numeric values defined inside a numeric interval given by 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:

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.

See Also:
IltObjectState.getInteger(ilog.tgo.model.IltNumericState), IltObjectState.getFloat(ilog.tgo.model.IltNumericState), IltObjectState.setInteger(ilog.tgo.model.IltNumericState, int), IltObjectState.setFloat(ilog.tgo.model.IltNumericState, float), IltObjectState.set(IltState, Object)

Field Summary
static Float MaxValue
          Maximum value
static IltStateInfo metainfo
          Contains metainformation about this IltLimitedNumericState class.
static Float MinValue
          Minimum value
 
Fields inherited from class ilog.tgo.model.IltState
_message
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class ilog.tgo.model.IltNumericState
getDouble, getToolTipText, getToolTipText
 
Methods inherited from class ilog.tgo.model.IltSimpleState
createValue, getDefault, hasDefault
 
Methods inherited from class ilog.tgo.model.IltState
CreateNameFilter, CreateStateFilter, equals, getAliases, getAllPaths, getAltName, getDescription, getName, getProperty, getStateInfo, hasDescription, hashCode, intern, isInside, IsPropertyTransient, removeProperty, setAltName, setProperty, SetPropertyTransient, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metainfo

public static IltStateInfo metainfo
Contains metainformation about this IltLimitedNumericState class.

Internal method or field: do not use!

MinValue

public static Float MinValue
Minimum value


MaxValue

public static Float MaxValue
Maximum value

Constructor Detail

IltLimitedNumericState

public IltLimitedNumericState(String name,
                              String description,
                              Number defaultValue,
                              Number maxValue,
                              boolean useMax,
                              Number minValue,
                              boolean useMin)
Creates an IltLimitedNumericState. This constructor creates a numeric state which may have values defined by an internal, given by MinValue..MaxValue.

Parameters:
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.

IltLimitedNumericState

public IltLimitedNumericState(String name,
                              String description,
                              String message,
                              Number defaultValue,
                              Number maxValue,
                              boolean useMax,
                              Number minValue,
                              boolean useMin)
Creates an IltLimitedNumericState. This constructor creates a numeric state which may have values defined by an internal, given by MinValue..MaxValue.

Parameters:
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.
Since:
JTGO 3.1

IltLimitedNumericState

public IltLimitedNumericState()
Default constructor. This method is used by CSS styling mechanism and is not meant to be called directly.

Internal method or field: do not use!
Method Detail

setName

public void setName(String name)
Sets the name of this object. This method is used by CSS styling mechanism and is not meant to be called directly.

Overrides:
setName in class IltState
Internal method or field: do not use!

setDescription

public void setDescription(String description)
Description copied from class: IltState
Sets a new description to the state.

The description is displayed as tooltip when the state is graphically represented in the object as a secondary state.

Overrides:
setDescription in class IltState

setMessage

public void setMessage(String message)
Sets the message of this object. This method is used by CSS styling mechanism and is not meant to be called directly.

Overrides:
setMessage in class IltState
Internal method or field: do not use!

setDefault

public void setDefault(Object defaultValue)
Description copied from class: IltSimpleState
Sets the default value of the state.

Overrides:
setDefault in class IltSimpleState

getMinValue

public Number getMinValue()
Returns the minimum value for this state.


setMinValue

public void setMinValue(Number limit)
Sets the minimum value for this state.


getMaxValue

public Number getMaxValue()
Returns the maximum value for this state.


setMaxValue

public void setMaxValue(Number limit)
Sets the maximum value for this state.

Parameters:
limit - The maximum value this state can be assigned.

isUsingMaxValue

public boolean isUsingMaxValue()
Returns whether or not this state is respecting the maximum value.


setUsingMaxValue

public void setUsingMaxValue(boolean use)
Determines whether or not this state will respect the maximum value.

Parameters:
use - Flag which indicates whether the maximum limit will be respected.

isUsingMinValue

public boolean isUsingMinValue()
Returns whether or not this state is respecting the minimum value.


setUsingMinValue

public void setUsingMinValue(boolean use)
Determines whether or not this state will respect the minimum value.

Parameters:
use - Flag which indicates whether the minimum limit will be respected.

copy

public void copy(IltState from)
Copy the values from the source state

Overrides:
copy in class IltState

list

public void list(IlpContext context,
                 IltStateListing listing,
                 Object value)
Generates a plain text listing of a state. The text is generated when the value of the state is true.

Overrides:
list in class IltNumericState
Internal method or field: do not use!

isValid

public boolean isValid(Object value)
This method verifies if the given value can be set in the state. If the value is valid, this method returns true.

Overrides:
isValid in class IltNumericState
Internal method or field: do not use!

clone

public Object clone()
Creates a copy of this object.

Overrides:
clone in class Object
Internal method or field: do not use!

getValue

public float getValue(Object value)
Internal method or field: do not use!

getValues

public float[] getValues(Object value)
Internal method or field: do not use!


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.