aima.logic.fol.kb.data
Class Chain

java.lang.Object
  extended by aima.logic.fol.kb.data.Chain

public class Chain
extends java.lang.Object


Constructor Summary
Chain()
           
Chain(java.util.List<Literal> literals)
           
Chain(java.util.Set<Literal> literals)
           
 
Method Summary
 void addLiteral(Literal literal)
           
 java.util.List<Chain> getContrapositives()
          A contrapositive of a chain is a permutation in which a different literal is placed at the front.
 Literal getHead()
           
 java.util.List<Literal> getLiterals()
           
 int getNumberLiterals()
           
 ProofStep getProofStep()
           
 java.util.List<Literal> getTail()
           
 boolean isEmpty()
           
 void setProofStep(ProofStep proofStep)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Chain

public Chain()

Chain

public Chain(java.util.List<Literal> literals)

Chain

public Chain(java.util.Set<Literal> literals)
Method Detail

getProofStep

public ProofStep getProofStep()

setProofStep

public void setProofStep(ProofStep proofStep)

isEmpty

public boolean isEmpty()

addLiteral

public void addLiteral(Literal literal)

getHead

public Literal getHead()

getTail

public java.util.List<Literal> getTail()

getNumberLiterals

public int getNumberLiterals()

getLiterals

public java.util.List<Literal> getLiterals()

getContrapositives

public java.util.List<Chain> getContrapositives()
A contrapositive of a chain is a permutation in which a different literal is placed at the front. The contrapositives of a chain are logically equivalent to the original chain.

Returns:
a list of contrapositives for this chain.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object