Rule Execution Server API

ilog.rules.factory
Class IlrFieldValue

java.lang.Object
  extended by ilog.rules.factory.IlrValue
      extended by ilog.rules.factory.IlrFieldValue
All Implemented Interfaces:
IlrAssignable, Serializable

public final class IlrFieldValue
extends IlrValue
implements IlrAssignable

This class represents a field value of an object.

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 Summary
IlrFieldValue(IlrValue object, Field field)
          Constructs a field value using an object and a Java field.
IlrFieldValue(IlrValue object, IlrAttribute field)
          Constructs a field value using an object and a XOM attribute.
IlrFieldValue(IlrValue object, String fieldName)
          Constructs a field of the object passed as the argument.
 
Method Summary
 IlrAssignment addAssign(IlrValue value)
          Creates a field assignment represented by the value passed as the argument.
 IlrAssignment assign(IlrValue value)
          Creates a field assignment represented by the value passed as the argument.
 IlrAssignment divideAssign(IlrValue value)
          Creates a field assignment represented by the value passed as the argument.
 Object exploreAssignable(IlrFactoryExplorer explorer)
          Explores this field value as an assignable entity using a factory explorer and returns an object as a result.
 Object exploreValue(IlrFactoryExplorer explorer)
          Explores this field value using a factory explorer and returns an object as a result.
 String getClassName()
          Gets the fully-qualified name of the class which declares the field.
 String getName()
          Gets the name of the field.
 IlrValue getObject()
          Gets the object to which this field value refers.
 String getShortClassName()
          Gets the short name of the class which declares the field.
 IlrAttribute getXOMField()
          Gets the XOM field of this field value.
 boolean isAssignableFrom(IlrValue value)
          Checks whether the field can be assigned to a value.
 boolean isFinal()
          Checks whether the field is a final field.
 IlrAssignment multiplyAssign(IlrValue value)
          Creates a field assignment represented by the value passed as the argument.
 IlrAssignment remainderAssign(IlrValue value)
          Creates a field assignment represented by the value passed as the argument.
 IlrAssignment subtractAssign(IlrValue value)
          Creates a field assignment represented by the value passed as the argument.
 String toString()
           
 
Methods inherited from class ilog.rules.factory.IlrValue
add, divide, getField, getReflect, getType, getXOMType, invokeEquals, isConstant, isEvent, isEventCondition, 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, wait, wait, wait
 
Methods inherited from interface ilog.rules.factory.IlrAssignable
getType
 

Constructor Detail

IlrFieldValue

public IlrFieldValue(IlrValue object,
                     String fieldName)
Constructs a field of the object passed as the argument.

Parameters:
object - The object to which the field refers to.
fieldName - The name of the field.

IlrFieldValue

public IlrFieldValue(IlrValue object,
                     Field field)
Constructs a field value using an object and a Java field.

Parameters:
object - The object to which the field refers to.
field - The field of the object.

IlrFieldValue

public IlrFieldValue(IlrValue object,
                     IlrAttribute field)
Constructs a field value using an object and a XOM attribute.

Parameters:
object - The object to which the attribute refers to.
field - The attribute of the object.
Method Detail

isFinal

public boolean isFinal()
Checks whether the field is a final field.

Returns:
true is the field is final, false otherwise.

isAssignableFrom

public boolean isAssignableFrom(IlrValue value)
Checks whether the field can be assigned to a value.

Specified by:
isAssignableFrom in interface IlrAssignable
Parameters:
value - The value to be assigned to the field.
Returns:
true is the field type is compatible with the type of the passed argument, and false otherwise.

getObject

public IlrValue getObject()
Gets the object to which this field value refers.

Returns:
The object to which this field value refers.

getXOMField

public IlrAttribute getXOMField()
Gets the XOM field of this field value.

Returns:
The XOM field of this field value.

getName

public String getName()
Gets the name of the field.

Returns:
The name of the field.

getClassName

public String getClassName()
Gets the fully-qualified name of the class which declares the field.

Returns:
The fully-qualified name of the class which declares the field.

getShortClassName

public String getShortClassName()
Gets the short name of the class which declares the field.

Returns:
The short name of the class which declares the field.

exploreValue

public Object exploreValue(IlrFactoryExplorer explorer)
Explores this field value using a factory explorer and returns an object as a result.

Specified by:
exploreValue in class IlrValue
Parameters:
explorer - The factory explorer.
Returns:
An object which represents the result of the exploration, or null if the method does not return a value.

exploreAssignable

public Object exploreAssignable(IlrFactoryExplorer explorer)
Explores this field value as an assignable entity using a factory explorer and returns an object as a result.

Specified by:
exploreAssignable in interface IlrAssignable
Parameters:
explorer - The factory explorer.
Returns:
An object which represents the result of the exploration, or null if the method does not return a value.

assign

public IlrAssignment assign(IlrValue value)
Creates a field assignment represented by the value passed as the argument.

Parameters:
value - The value to be assigned to the field.
Returns:
A field assignment object.

addAssign

public IlrAssignment addAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is: this += value.

Parameters:
value - The value to be assigned to the field.
Returns:
A field assignment object.

subtractAssign

public IlrAssignment subtractAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is: this -= value.

Parameters:
value - The value to be assigned to the field.
Returns:
A field assignment object.

multiplyAssign

public IlrAssignment multiplyAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is: this *= value.

Parameters:
value - The value to be assigned to the field.
Returns:
A field assignment object.

divideAssign

public IlrAssignment divideAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is: this /= value.

Parameters:
value - The value to be assigned to the field.
Returns:
A field assignment object.

remainderAssign

public IlrAssignment remainderAssign(IlrValue value)
Creates a field assignment represented by the value passed as the argument. The assignment represented here is: this %= value.

Parameters:
value - The value to be assigned to the field.
Returns:
A field assignment object.

toString

public String toString()
Overrides:
toString in class Object

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013