ilog.rules.factory
Class IlrVariable
- java.lang.Object
-
- ilog.rules.factory.IlrValue
-
- ilog.rules.factory.IlrVariable
-
- All Implemented Interfaces:
- IlrAssignable, ilog.rules.factory.IlrRulesetElement, ilog.rules.factory.IlrVariableElement, java.io.Serializable
public class IlrVariable extends IlrValue implements IlrAssignable, ilog.rules.factory.IlrVariableElement
This class represents a variable binding of the rule language.Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of IBM Decision Server.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description protected booleanrulesetVariable
-
Constructor Summary
Constructors Constructor and Description IlrVariable(IlrReflect reflect, java.lang.String definitionName, java.lang.Class type)Constructs a variable binding.IlrVariable(java.lang.String definitionName, IlrType type)Constructs a variable binding.IlrVariable(java.lang.String name, IlrValue value)Constructs a variable binding.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.ObjectexploreAssignable(IlrFactoryExplorer explorer)This method explores the variable using a factory explorer.java.lang.ObjectexploreValue(IlrFactoryExplorer explorer)This method explores the variable using a factory explorer.java.lang.StringgetName()Gets the name of the variable.IlrPackageFactorygetPackage()Returns the package in which the variable is defined in case this variable models a package variable.java.lang.StringgetShortName()Gets the short name of the variableIlrValuegetValue()Gets the value of the variable.booleanisAssignableFrom(IlrValue value)Checks whether the valuevaluecan be assigned to the variable.booleanisEventCondition()Returns whether this value is, or is bound to, the result of a condition, and this condition is an event condition.voidsetName(java.lang.String name)Sets the name of the variable.voidsetValue(IlrValue value)Sets the value of the variable.-
Methods inherited from class ilog.rules.factory.IlrValue
add, divide, getField, getReflect, getType, getXOMType, invokeEquals, isConstant, isEvent, isNull, multiply, remainder, subtract, testAfter, testAfter, testBefore, testBefore, testEqual, testFalse, testGreaterOrEqual, testGreaterThan, testIn, testInstanceOf, testLessOrEqual, testLessThan, testNotEqual, testNotIn, testOccursin, testTrue, timeof, toNegative, toPositive, toPostfixDecr, toPostfixIncr, toPrefixDecr, toPrefixIncr
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ilog.rules.factory.IlrAssignable
getType
-
-
-
-
Constructor Detail
-
IlrVariable
public IlrVariable(java.lang.String name, IlrValue value)Constructs a variable binding.- Parameters:
name- The name of the variable.value- The value to which the variable is bound.
-
IlrVariable
public IlrVariable(IlrReflect reflect, java.lang.String definitionName, java.lang.Class type)
Constructs a variable binding.- Parameters:
reflect- A reflect.definitionName- The name of the variable.type- The type to which the variable is bound.
-
IlrVariable
public IlrVariable(java.lang.String definitionName, IlrType type)Constructs a variable binding.- Parameters:
definitionName- The name of the variable.type- The type to which the variable is bound.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of the variable.- Returns:
- The name of the variable.
-
getShortName
public java.lang.String getShortName()
Gets the short name of the variable- Returns:
- the short name of the variable
-
setName
public void setName(java.lang.String name)
Sets the name of the variable.- Parameters:
name- The new name of the variable.
-
getValue
public IlrValue getValue()
Gets the value of the variable.- Returns:
- The value of the variable.
-
setValue
public void setValue(IlrValue value)
Sets the value of the variable.- Parameters:
value- The new value of the variable.
-
isAssignableFrom
public boolean isAssignableFrom(IlrValue value)
Checks whether the valuevaluecan be assigned to the variable.- Specified by:
isAssignableFromin interfaceIlrAssignable- Parameters:
value- The value assigned to the expression.- Returns:
trueis the valuevaluecan be assigned to the variable,falseotherwise.
-
isEventCondition
public boolean isEventCondition()
Description copied from class:IlrValueReturns whether this value is, or is bound to, the result of a condition, and this condition is an event condition.- Overrides:
isEventConditionin classIlrValue- Returns:
trueif this value is, or is bound to, the result of an event condition, andfalseotherwise.
-
exploreValue
public java.lang.Object exploreValue(IlrFactoryExplorer explorer)
This method explores the variable using a factory explorer.- Specified by:
exploreValuein classIlrValue- Parameters:
explorer- The factory explorer.- Returns:
- An object, the result of the exploration, or
nullif the method does not return a value.
-
exploreAssignable
public java.lang.Object exploreAssignable(IlrFactoryExplorer explorer)
This method explores the variable using a factory explorer. In this case, the variable is an assignable object.- Specified by:
exploreAssignablein interfaceIlrAssignable- Parameters:
explorer- The factory explorer.- Returns:
- An object, the result of the exploration, or
nullif the method does not return a value.
-
getPackage
public IlrPackageFactory getPackage()
Returns the package in which the variable is defined in case this variable models a package variable. Otherwise it returnsnull.- Returns:
- The package in which the variable is defined.
-
-