Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jason.asSyntax
Class Plan

    java.lang.Object
      jason.asSyntax.DefaultTerm
          jason.asSyntax.Literal
              jason.asSyntax.Atom
                  jason.asSyntax.Structure
                      jason.asSyntax.Plan

All Implemented Interfaces:
  LogicalFormula, Term, ToDOM, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Term>

    public class Plan

extends Structure
implements java.lang.Cloneable, java.io.Serializable

Represents an AgentSpack plan (it extends structure to be used as a term)

See Also:
  Serialized Form

Field Summary

Fields inherited from class jason.asSyntax.Structure
`emptyTermArray, emptyTermList`

Fields inherited from class jason.asSyntax.Literal
`LFalse, LNeg, LPos, LTrue, predicateIndicatorCache`

Fields inherited from class jason.asSyntax.DefaultTerm
`hashCodeCache, srcInfo`

Constructor Summary
`Plan()`
`Plan(Pred label, Trigger te, LogicalFormula ct, PlanBody bd)`

Method Summary
`Term` | `clone()` make a deep copy of the terms
`Plan` | `cloneOnlyBody()` used to create a plan clone in a new IM
`boolean` | `equals(java.lang.Object o)`
`int` | `getArity()` returns the number of terms of this literal
`org.w3c.dom.Element` | `getAsDOM(org.w3c.dom.Document document)` get as XML
`PlanBody` | `getBody()`
`LogicalFormula` | `getContext()`
`Pred` | `getLabel()`
`Term` | `getTerm(int i)` returns the i-th term (first term is 0)
`Trigger` | `getTrigger()`
`Trigger` | `getTriggerEvent()` Deprecated. use getTrigger
`boolean` | `hasBreakpoint()`
`boolean` | `isAllUnifs()`
`boolean` | `isAtomic()`
`Unifier` | `isRelevant(Trigger te)` returns an unifier if this plan is relevant for the event te, returns null otherwise.
`static Plan` | `parse(java.lang.String sPlan)` prefer using ASSyntax.parsePlan
`void` | `setAsPlanTerm(boolean b)`
`void` | `setContext(LogicalFormula le)`
`void` | `setLabel(Pred p)`
`void` | `setTerm(int i, Term t)`
`java.lang.String` | `toASString()` returns this plan in a string complaint with AS syntax
`java.lang.String` | `toString()`

Methods inherited from class jason.asSyntax.Structure
`addTerm, addTerms, addTerms, apply, calcHashCode, compareTo, countVars, delTerm, getSingletonVars, getTerms, getTermsSize, hasTerm, hasVar, isAtom, isGround, isStructure, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, setTerms, varToReplace`

Methods inherited from class jason.asSyntax.Atom
`getFunctor`

Methods inherited from class jason.asSyntax.Literal
`addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnots, getAnnots, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, isLiteral, logicalConsequence, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated`

Methods inherited from class jason.asSyntax.DefaultTerm
`getErrorMsg, getSrcInfo, hashCode, isArithExpr, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface jason.asSyntax.Term
`getSrcInfo, isArithExpr, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, setSrcInfo`

Constructor Detail

### Plan

    public Plan()

### Plan

    public Plan(Pred label,
                Trigger te,
                LogicalFormula ct,
                PlanBody bd)

Method Detail

### getArity

    public int getArity()

  Description copied from class: `Literal`
  returns the number of terms of this literal

  Overrides:
    `getArity` in class `Structure`

### getTerm

    public Term getTerm(int i)

  Description copied from class: `Literal`
  returns the i-th term (first term is 0)

  Overrides:
    `getTerm` in class `Structure`

### setTerm

    public void setTerm(int i,
                        Term t)

  Overrides:
    `setTerm` in class `Structure`

### setLabel

    public void setLabel(Pred p)

### getLabel

    public Pred getLabel()

### setContext

    public void setContext(LogicalFormula le)

### setAsPlanTerm

    public void setAsPlanTerm(boolean b)

### parse

    public static Plan parse(java.lang.String sPlan)

  prefer using ASSyntax.parsePlan

### getTriggerEvent

    public Trigger getTriggerEvent()

  Deprecated. use getTrigger

### getTrigger

    public Trigger getTrigger()

### getContext

    public LogicalFormula getContext()

### getBody

    public PlanBody getBody()

### isAtomic

    public boolean isAtomic()

### hasBreakpoint

    public boolean hasBreakpoint()

### isAllUnifs

    public boolean isAllUnifs()

### isRelevant

    public Unifier isRelevant(Trigger te)

  returns an unifier if this plan is relevant for the event te, returns null otherwise.

### equals

    public boolean equals(java.lang.Object o)

  Specified by:
    `equals` in interface `Term`
  Overrides:
    `equals` in class `Structure`

### clone

    public Term clone()

  Description copied from class: `Structure`
  make a deep copy of the terms

  Specified by:
    `clone` in interface `Term`
  Overrides:
    `clone` in class `Structure`

### cloneOnlyBody

    public Plan cloneOnlyBody()

  used to create a plan clone in a new IM

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Structure`

### toASString

    public java.lang.String toASString()

  returns this plan in a string complaint with AS syntax

### getAsDOM

    public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)

  get as XML

  Specified by:
    `getAsDOM` in interface `ToDOM`
  Overrides:
    `getAsDOM` in class `Structure`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD