ilog.rules.factory

Class IlrArrayElement

  • All Implemented Interfaces:
    IlrAssignable, java.io.Serializable


    public final class IlrArrayElement
    extends IlrValue
    implements IlrAssignable
    This class represents an array element expression. An array element expression is an expression of the form arr[index]. An array element expression is assignable.

    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
    • Constructor Detail

      • IlrArrayElement

        public IlrArrayElement(IlrValue array,
                               IlrValue[] indexes)
        Constructs an array element expression using an array expression and an index expression. The constructed expression is attached to the same IlrReflect object as array.
        Parameters:
        array - An expression, whose type must be an array.
        indexes - An array of expressions, whose type must be integer.
    • Method Detail

      • getArray

        public IlrValue getArray()
        Gets the array value of this expression.
        Returns:
        The array expression.
      • getIndexes

        public IlrValue[] getIndexes()
        Gets the indexes values of this expression.
        Returns:
        The indexes values.
      • setIndexes

        public void setIndexes(IlrValue[] indexes)
        Changes the indexes values of this expression.
        Parameters:
        indexes - The new indexes values.
      • isAssignableFrom

        public boolean isAssignableFrom(IlrValue value)
        Checks whether the array element can be assigned a given value.
        Specified by:
        isAssignableFrom in interface IlrAssignable
        Parameters:
        value - The value to be assigned to the array element.
        Returns:
        true if the assignment is permitted, false otherwise.
      • exploreValue

        public java.lang.Object exploreValue(IlrFactoryExplorer explorer)
        Explores the array element as a value and returns an object as a result.
        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)
        Explores the array element as an assignable entity and returns an object as a result.
        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.

© Copyright IBM Corp. 1987, 2021