JACK 5.4 Application Interface

aos.jack.jak.logic
Class Signature

java.lang.Object
  extended byaos.jack.jak.logic.Signature

public class Signature
extends java.lang.Object

This class is used to store an applicable instance of a plan in both the applicable and failure sets. It contains all the information for:


        1) re-establishing the instance to enable it to run

        2) comparing to instances of the same plan to determine
           if they are (logically) equivilent
 


Constructor Summary
Signature()
           
 
Method Summary
 Event getEvent()
          Returns the event for which this Signature was created.
 PlanInstanceInfo getInfo()
           
 Variable getLogicalVariable(int i)
           
 Plan getPlan()
          Returns the plan factory.
 java.lang.String getPlanName()
          Gets the name of the Plan, as a fully qualified Java class name.
 Unifiable getValueOf(Variable v)
           
 java.lang.Object getVariable(int n)
          Gets the numbered Plan variable.
 java.lang.Object getVariable(java.lang.String name)
          Gets the named Plan variable.
 java.lang.String getVariableValue(int n)
          Converts the value of the numbered variable to a String as if it had been appended to "".
 java.lang.String getVariableValue(java.lang.String name)
          Converts the value of the named variable to a String as if it had been appended to "".
 int hashCode()
          NOTE: the hashcode is only computed when first requested and is never recomputed for purposes of efficiency.
 boolean isSame(aos.jack.jak.trace.PlanIntrospection that)
          Tests if the underlying object represents the same Plan instance as this one.
static Signature newSignature(int log)
           
static Signature newSignature(Plan p, Plan sen, Event e, aos.jack.jak.logic.ChoicePoint cp)
          Gets a new signature out of of the Signature pool, giving it a choicepoint.
static Signature newSignature(Variable[] vars)
           
 void remove()
           
 java.lang.String toString()
          Produce a string representing the binding set.
 java.lang.String[] variableNames()
          Gets a String array of the names of the Object's variables.
 java.lang.String[] variableTypes()
          Gets a String array of the type names of the Object's variables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Signature

public Signature()
Method Detail

getPlan

public Plan getPlan()
Returns the plan factory.


getEvent

public Event getEvent()
Returns the event for which this Signature was created.


getInfo

public PlanInstanceInfo getInfo()

getValueOf

public Unifiable getValueOf(Variable v)

variableNames

public java.lang.String[] variableNames()
Gets a String array of the names of the Object's variables. The ordinal of a variable in the array is used to access its value with getValue.


variableTypes

public java.lang.String[] variableTypes()
Gets a String array of the type names of the Object's variables. The ordering in the array matches that returned by variableNames.


getVariableValue

public java.lang.String getVariableValue(int n)
Converts the value of the numbered variable to a String as if it had been appended to "".

Returns:
the numbered variable appended to "" or "NOT FOUND" if the index is out of range.

getVariableValue

public java.lang.String getVariableValue(java.lang.String name)
Converts the value of the named variable to a String as if it had been appended to "".

Returns:
the named variable appended to "" or "NOT FOUND" if the variable does not exist

getVariable

public java.lang.Object getVariable(int n)
Gets the numbered Plan variable.

Throws:
java.lang.IndexOutOfBoundsException - if the variable does not exist.

getVariable

public java.lang.Object getVariable(java.lang.String name)
Gets the named Plan variable.

Throws:
java.lang.IllegalArgumentException - if the variable does not exist.

getPlanName

public java.lang.String getPlanName()
Gets the name of the Plan, as a fully qualified Java class name.

Returns:
the Java class name of the Plan

isSame

public boolean isSame(aos.jack.jak.trace.PlanIntrospection that)
Tests if the underlying object represents the same Plan instance as this one.

For a Plan, no other Object is the same. It's only the same as itself.

Returns:
true if this and that represent the same Plan instance

hashCode

public int hashCode()
NOTE: the hashcode is only computed when first requested and is never recomputed for purposes of efficiency.


getLogicalVariable

public Variable getLogicalVariable(int i)

toString

public java.lang.String toString()
Produce a string representing the binding set. The format of the returned string may change in a future release.


newSignature

public static Signature newSignature(int log)

newSignature

public static Signature newSignature(Variable[] vars)

newSignature

public static Signature newSignature(Plan p,
                                     Plan sen,
                                     Event e,
                                     aos.jack.jak.logic.ChoicePoint cp)
Gets a new signature out of of the Signature pool, giving it a choicepoint.


remove

public void remove()

JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088