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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intclone and applies together (and faster than clone and then apply)abstract Termclone()clone in another namespaceintvoidinthashCode()booleanbooleanbooleanisAtom()booleanbooleanisGround()booleanbooleanisList()booleanbooleanisMap()booleanbooleanbooleanisPred()booleanisRule()booleanisSet()booleanisString()booleanbooleanbooleanisVar()static TermDeprecated.it is preferable to use ASSyntax.parseTermvoidvoidRemoves the value cached for hashCodebooleanMethods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:
isUnnamedVarin 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:
isInternalActionin interfaceTerm
-
isArithExpr
public boolean isArithExpr()- Specified by:
isArithExprin interfaceTerm
-
isNumeric
public boolean isNumeric() -
isPred
public boolean isPred() -
isStructure
public boolean isStructure()- Specified by:
isStructurein interfaceTerm
-
isAtom
public boolean isAtom() -
isPlanBody
public boolean isPlanBody()- Specified by:
isPlanBodyin interfaceTerm
-
isGround
public boolean isGround() -
isCyclicTerm
public boolean isCyclicTerm()- Specified by:
isCyclicTermin interfaceTerm
-
getCyclicVar
- Specified by:
getCyclicVarin interfaceTerm
-
hasVar
-
countVars
-
clone
-
calcHashCode
protected abstract int calcHashCode() -
hashCode
public int hashCode() -
resetHashCodeCache
public void resetHashCodeCache() -
compareTo
- Specified by:
compareToin interfaceComparable<Term>
-
subsumes
-
capply
Description copied from interface:Termclone and applies together (and faster than clone and then apply) -
cloneNS
Description copied from interface:Termclone in another namespace -
getSrcInfo
- Specified by:
getSrcInfoin interfaceTerm
-
setSrcInfo
Description copied from interface:TermRemoves the value cached for hashCode- Specified by:
setSrcInfoin interfaceTerm
-
getErrorMsg
-