logic
Class Literal
java.lang.Object
logic.SymbolicObject
logic.Term
logic.AtomicTerm
logic.Literal
- All Implemented Interfaces:
- java.lang.Cloneable
- public class Literal
- extends AtomicTerm
Constructor Summary |
Literal(double value)
|
Literal(java.lang.String name)
|
Methods inherited from class logic.AtomicTerm |
copyTypesFrom, equals, equals, getFirstTerm, getRest, hashCode, isCompound, isSymbol, reconcileTypes, symbolicMatch, toString, typeCompatible |
Methods inherited from class logic.SymbolicObject |
copyData, debugString, geq, getOccurrences, getProbability, gt, infoString, leq, lt, setOccurrences, setProbability |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Literal
public Literal(java.lang.String name)
Literal
public Literal(double value)
clone
public java.lang.Object clone()
- Overrides:
clone
in class Term
getName
public java.lang.String getName()
- Overrides:
getName
in class Term
isNumeric
public boolean isNumeric()
numericValue
public double numericValue()
symbolicSignature
public SymbolicObject symbolicSignature()
- Defined in AtomicTerm superclass:
isCompound()
isSymbol()
getFirst()
getRest()
- Overrides:
symbolicSignature
in class AtomicTerm
compareTo
public int compareTo(java.lang.Object other)
- Description copied from class:
SymbolicObject
- Compare two SymbolicObjects. The result is zero if the objects
are equal according to the equals() operator. Otherwise, the
result is a negative integer if this object's name
lexicographically precedes the other's name. The result is a
positive integer if this object's name lexicographically follows
the other's name.
- Overrides:
compareTo
in class AtomicTerm
equals
protected boolean equals(Term o)
obtainVariables
public TermList obtainVariables()
- From SymbolicObject abstract class.
returns an empty *, because a Literal has no variables in it.
- Specified by:
obtainVariables
in class SymbolicObject
substituteVariable
public SymbolicObject substituteVariable(Variable oldVar,
Term newVar)
- Specified by:
substituteVariable
in class SymbolicObject
substitute
public SymbolicObject substitute(Substitution s)
- From Term abstract class
since
is all indexed by Variables, this should return itself
- Specified by:
substitute
in class SymbolicObject
unify
public Substitution unify(SymbolicObject t,
Substitution s)
- Description copied from class:
SymbolicObject
- Given two terms, return their most general unifier, or null if
they don't unify.
may be mutated.
- Specified by:
unify
in class SymbolicObject