logic
Class Literal

java.lang.Object
  extended bylogic.SymbolicObject
      extended bylogic.Term
          extended bylogic.AtomicTerm
              extended bylogic.Literal
All Implemented Interfaces:
java.lang.Cloneable

public class Literal
extends AtomicTerm


Field Summary
 
Fields inherited from class logic.Term
_name, _type
 
Constructor Summary
Literal(double value)
           
Literal(java.lang.String name)
           
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(java.lang.Object other)
          Compare two SymbolicObjects.
protected  boolean equals(Term o)
           
 java.lang.String getName()
           
 boolean isNumeric()
           
 double numericValue()
           
 TermList obtainVariables()
          From SymbolicObject abstract class.
 SymbolicObject substitute(Substitution s)
          From Term abstract class since is all indexed by Variables, this should return itself
 SymbolicObject substituteVariable(Variable oldVar, Term newVar)
           
 SymbolicObject symbolicSignature()
          Defined in AtomicTerm superclass: isCompound() isSymbol() getFirst() getRest()
 Substitution unify(SymbolicObject t, Substitution s)
          Given two terms, return their most general unifier, or null if they don't unify.
 
Methods inherited from class logic.AtomicTerm
copyTypesFrom, equals, equals, getFirstTerm, getRest, hashCode, isCompound, isSymbol, reconcileTypes, symbolicMatch, toString, typeCompatible
 
Methods inherited from class logic.Term
getFirst, getType, getTypeName, isTyped, setType
 
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
 

Constructor Detail

Literal

public Literal(java.lang.String name)

Literal

public Literal(double value)
Method Detail

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