lij.runtime
Class ConstraintInstance.ConstraintListInstance

java.lang.Object
  extended by lij.runtime.ConstraintInstance
      extended by lij.runtime.ConstraintInstance.ConstraintListInstance
Enclosing class:
ConstraintInstance

private static class ConstraintInstance.ConstraintListInstance
extends ConstraintInstance

A ConstraintInstance subclass for list constraints.


Field Summary
 
Fields inherited from class lij.runtime.ConstraintInstance
agentInstance, constraint, interpreter
 
Constructor Summary
private ConstraintInstance.ConstraintListInstance()
           
 
Method Summary
 Result.State check()
          This method needs to be implemented by any subclasses.
private  java.util.ArrayList<java.io.Serializable> createListForArgument(Argument argument)
          Accepts an Argument, which can be either an ArrayList or a singleton value, creates a new ArrayList containing this Argument, and returns it.
 
Methods inherited from class lij.runtime.ConstraintInstance
createConstraintInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintInstance.ConstraintListInstance

private ConstraintInstance.ConstraintListInstance()
Method Detail

check

public Result.State check()
                   throws InterpreterException
Description copied from class: ConstraintInstance
This method needs to be implemented by any subclasses. It performs the evaluation (checking) of the constraint.

Specified by:
check in class ConstraintInstance
Returns:
The result of the evaluation (TRUE, FALSE or MAYBE).
Throws:
InterpreterException

createListForArgument

private java.util.ArrayList<java.io.Serializable> createListForArgument(Argument argument)
                                                                 throws InterpreterException
Accepts an Argument, which can be either an ArrayList or a singleton value, creates a new ArrayList containing this Argument, and returns it. The effect is that the returned object is always an ArrayList, regardless of whether the Argument specified originally was a list or a singleton.

Parameters:
argument - The Argument to encapsulate into an ArrayList.
Returns:
The ArrayList.
Throws:
InterpreterException