public class LiteralImpl extends Pred
emptyTermArray, emptyTermList
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Modifier | Constructor and Description |
---|---|
|
LiteralImpl(boolean pos,
Literal l)
if pos == true, the literal is positive, otherwise it is negative
|
|
LiteralImpl(boolean pos,
java.lang.String functor)
if pos == true, the literal is positive, otherwise it is negative
|
|
LiteralImpl(Literal l) |
protected |
LiteralImpl(Literal l,
Unifier u) |
|
LiteralImpl(java.lang.String functor)
creates a positive literal
|
protected |
LiteralImpl(java.lang.String functor,
int terms) |
Modifier and Type | Method and Description |
---|---|
protected int |
calcHashCode() |
boolean |
canBeAddedInBB()
to be overridden by subclasses (as internal action)
|
Term |
capply(Unifier u)
clone and applies together (and faster than clone and then apply)
|
Term |
clone()
make a deep copy of the terms
|
int |
compareTo(Term t) |
boolean |
equals(java.lang.Object o) |
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get as XML
|
java.lang.String |
getErrorMsg() |
PredicateIndicator |
getPredicateIndicator()
returns [~] super.getPredicateIndicator
|
boolean |
isAtom() |
boolean |
negated()
returns whether this literal is negated or not, use Literal.LNeg and Literal.LPos to compare the returned value
|
Literal |
setNegated(boolean b)
changes the negation of the literal and return this
|
java.lang.String |
toString() |
addAnnot, addAnnots, addAnnots, addSource, clearAnnots, countVars, createSource, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, getAnnot, getAnnots, getAnnots, getSources, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, hasVar, importAnnots, isGround, isPred, makeVarsAnnon, parsePred, setAnnots, toStringAsTerm
addTerm, addTerms, addTerms, delTerm, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, isStructure, isUnary, makeTermsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, varToReplace
getFunctor
copy, forceFullLiteralImpl, getAsListOfTerms, getTermsArray, isLiteral, logicalConsequence, newFromListOfTerms, parseLiteral
getCyclicVar, getSrcInfo, hashCode, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
finalize, getClass, notify, notifyAll, wait, wait, wait
getCyclicVar, getSrcInfo, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isRule, isString, isUnnamedVar, isVar, setSrcInfo
public LiteralImpl(java.lang.String functor)
public LiteralImpl(boolean pos, java.lang.String functor)
public LiteralImpl(Literal l)
public LiteralImpl(boolean pos, Literal l)
protected LiteralImpl(java.lang.String functor, int terms)
public boolean isAtom()
public boolean canBeAddedInBB()
canBeAddedInBB
in class Literal
public boolean negated()
Literal
public Literal setNegated(boolean b)
Literal
setNegated
in class Literal
public boolean equals(java.lang.Object o)
public java.lang.String getErrorMsg()
getErrorMsg
in class DefaultTerm
public int compareTo(Term t)
public Term capply(Unifier u)
Term
protected int calcHashCode()
calcHashCode
in class Structure
public PredicateIndicator getPredicateIndicator()
getPredicateIndicator
in class Literal