public class Trigger extends Structure implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Trigger.TEOperator |
static class |
Trigger.TEType |
emptyTermArray, emptyTermList
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Constructor and Description |
---|
Trigger(Trigger.TEOperator op,
Trigger.TEType t,
Literal l) |
Modifier and Type | Method and Description |
---|---|
Trigger |
capply(Unifier u)
clone and applies together (and faster than clone and then apply)
|
Trigger |
clone()
make a deep copy of the terms
|
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
|
Literal |
getLiteral() |
Trigger.TEOperator |
getOperator() |
PredicateIndicator |
getPredicateIndicator()
return [+|-][!|?] super.getPredicateIndicator
|
Term |
getTerm(int i)
returns the i-th term (first term is 0)
|
Trigger.TEType |
getType() |
boolean |
isAchvGoal() |
boolean |
isAddition() |
boolean |
isGoal() |
boolean |
isMetaEvent() |
static Trigger |
parseTrigger(java.lang.String sTe)
prefer to use ASSyntax.parseTrigger
|
boolean |
sameType(Trigger e) |
void |
setAsTriggerTerm(boolean b) |
void |
setLiteral(Literal literal) |
void |
setTerm(int i,
Term t) |
void |
setTrigOp(Trigger.TEOperator op) |
java.lang.String |
toString() |
static Trigger |
tryToGetTrigger(Term t)
try to convert the term t into a trigger, in case t is a trigger term, a string that can be parsed to a trigger, a var with value trigger, ....
|
addTerm, addTerms, addTerms, calcHashCode, compareTo, countVars, delTerm, getSingletonVars, getTerms, getTermsSize, hasTerm, hasVar, isAtom, isGround, isStructure, isUnary, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerms, subsumes, varToReplace
getFunctor
addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnot, getAnnots, getAnnots, getAsListOfTerms, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, isLiteral, logicalConsequence, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated
getCyclicVar, getErrorMsg, getSrcInfo, hashCode, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
finalize, getClass, notify, notifyAll, wait, wait, wait
getCyclicVar, getSrcInfo, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, setSrcInfo
public Trigger(Trigger.TEOperator op, Trigger.TEType t, Literal l)
public static Trigger parseTrigger(java.lang.String sTe)
public int getArity()
Literal
public Term getTerm(int i)
Literal
public void setTrigOp(Trigger.TEOperator op)
public boolean sameType(Trigger e)
public boolean equals(java.lang.Object o)
public boolean isAchvGoal()
public boolean isGoal()
public boolean isMetaEvent()
public Trigger.TEOperator getOperator()
public Trigger.TEType getType()
public boolean isAddition()
public Trigger capply(Unifier u)
Term
public PredicateIndicator getPredicateIndicator()
getPredicateIndicator
in class Literal
public Literal getLiteral()
public void setLiteral(Literal literal)
public void setAsTriggerTerm(boolean b)
public static Trigger tryToGetTrigger(Term t) throws jason.asSyntax.parser.ParseException
jason.asSyntax.parser.ParseException