ilog.rules.factory

Class 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 Detail

      • rulesetVariable

        protected boolean rulesetVariable
    • 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 value value can be assigned to the variable.
        Specified by:
        isAssignableFrom in interface IlrAssignable
        Parameters:
        value - The value assigned to the expression.
        Returns:
        true is the value value can be assigned to the variable, false otherwise.
      • isEventCondition

        public boolean isEventCondition()
        Description copied from class: IlrValue
        Returns whether this value is, or is bound to, the result of a condition, and this condition is an event condition.
        Overrides:
        isEventCondition in class IlrValue
        Returns:
        true if this value is, or is bound to, the result of an event condition, and false otherwise.
      • exploreValue

        public java.lang.Object exploreValue(IlrFactoryExplorer explorer)
        This method explores the variable using a factory explorer.
        Specified by:
        exploreValue in class IlrValue
        Parameters:
        explorer - The factory explorer.
        Returns:
        An object, the result of the exploration, or null if 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:
        exploreAssignable in interface IlrAssignable
        Parameters:
        explorer - The factory explorer.
        Returns:
        An object, the result of the exploration, or null if 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 returns null.
        Returns:
        The package in which the variable is defined.

© Copyright IBM Corp. 1987, 2020