Package jason.asSyntax
Class DefaultTerm
java.lang.Object
jason.asSyntax.DefaultTerm
- All Implemented Interfaces:
Term
,ToDOM
,ToJson
,Serializable
,Cloneable
,Comparable<Term>
- Direct Known Subclasses:
Literal
,MapTermImpl
,NumberTermImpl
,ObjectTermImpl
,SetTermImpl
,StringTermImpl
Base class for all terms.
(this class may be renamed to AbstractTerm in future releases of Jason, so
avoid using it -- use ASSyntax class to create new terms)
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract int
clone and applies together (and faster than clone and then apply)abstract Term
clone()
clone in another namespaceint
void
int
hashCode()
boolean
boolean
boolean
isAtom()
boolean
boolean
isGround()
boolean
boolean
isList()
boolean
boolean
isMap()
boolean
boolean
boolean
isPred()
boolean
isRule()
boolean
isSet()
boolean
isString()
boolean
boolean
boolean
isVar()
static Term
Deprecated.it is preferable to use ASSyntax.parseTermvoid
void
Removes the value cached for hashCodeboolean
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jason.util.ToJson
getAsJson, getAsJsonStr
-
Field Details
-
hashCodeCache
-
srcInfo
-
-
Constructor Details
-
DefaultTerm
public DefaultTerm()
-
-
Method Details
-
parse
Deprecated.it is preferable to use ASSyntax.parseTerm -
isVar
public boolean isVar() -
isUnnamedVar
public boolean isUnnamedVar()- Specified by:
isUnnamedVar
in interfaceTerm
-
isLiteral
public boolean isLiteral() -
isRule
public boolean isRule() -
isList
public boolean isList() -
isSet
public boolean isSet() -
isMap
public boolean isMap() -
isString
public boolean isString() -
isInternalAction
public boolean isInternalAction()- Specified by:
isInternalAction
in interfaceTerm
-
isArithExpr
public boolean isArithExpr()- Specified by:
isArithExpr
in interfaceTerm
-
isNumeric
public boolean isNumeric() -
isPred
public boolean isPred() -
isStructure
public boolean isStructure()- Specified by:
isStructure
in interfaceTerm
-
isAtom
public boolean isAtom() -
isPlanBody
public boolean isPlanBody()- Specified by:
isPlanBody
in interfaceTerm
-
isGround
public boolean isGround() -
isCyclicTerm
public boolean isCyclicTerm()- Specified by:
isCyclicTerm
in interfaceTerm
-
getCyclicVar
- Specified by:
getCyclicVar
in interfaceTerm
-
hasVar
-
countVars
-
clone
-
calcHashCode
protected abstract int calcHashCode() -
hashCode
public int hashCode() -
resetHashCodeCache
public void resetHashCodeCache() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Term>
-
subsumes
-
capply
Description copied from interface:Term
clone and applies together (and faster than clone and then apply) -
cloneNS
Description copied from interface:Term
clone in another namespace -
getSrcInfo
- Specified by:
getSrcInfo
in interfaceTerm
-
setSrcInfo
Description copied from interface:Term
Removes the value cached for hashCode- Specified by:
setSrcInfo
in interfaceTerm
-
getErrorMsg
-