public class LiteralImpl extends Pred
Literal.FalseLiteral, Literal.TrueLiteral
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private boolean |
type |
emptyTermArray, emptyTermList
DefaultNS, LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Modifier | Constructor and Description |
---|---|
|
LiteralImpl(Atom namespace,
boolean pos,
Literal l)
creates a literal based on another but in another name space and signal
|
|
LiteralImpl(Atom namespace,
boolean pos,
java.lang.String functor)
if pos == true, the literal is positive, otherwise it is negative
|
|
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
|
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
|
Literal |
cloneNS(Atom newNameSpace)
clone in another namespace
|
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
|
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, toString, varToReplace
getFunctor, getNS
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
private static final long serialVersionUID
private boolean type
public LiteralImpl(java.lang.String functor)
public LiteralImpl(boolean pos, java.lang.String functor)
public LiteralImpl(Literal l)
public LiteralImpl(boolean pos, Literal l)
public LiteralImpl(Atom namespace, boolean pos, java.lang.String functor)
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
public Literal cloneNS(Atom newNameSpace)
Term
protected int calcHashCode()
calcHashCode
in class Structure
public PredicateIndicator getPredicateIndicator()
getPredicateIndicator
in class Literal