JTP API Documentation

jtp.fol
Class DefaultCNFSentence

java.lang.Object
  |
  +--jtp.fol.DefaultCNFSentence
All Implemented Interfaces:
CNFSentence, Serializable, Substitutable

public class DefaultCNFSentence
extends Object
implements CNFSentence, Serializable

Default implementation of CNFSentence.

See Also:
Serialized Form

Constructor Summary
DefaultCNFSentence(Collection clauses)
           
 
Method Summary
 Collection clauses()
          Returns the collection of Clauses that make up this CNFSentence.
 Object substitute(Map m)
          Performs substitution in this object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultCNFSentence

public DefaultCNFSentence(Collection clauses)
Method Detail

clauses

public Collection clauses()
Description copied from interface: CNFSentence
Returns the collection of Clauses that make up this CNFSentence.

Specified by:
clauses in interface CNFSentence
Returns:
a Collection of Clauses

toString

public String toString()
Overrides:
toString in class Object

substitute

public Object substitute(Map m)
Description copied from interface: Substitutable
Performs substitution in this object. Specifically, this method produces an object derived from this Substitutable, with every occurrence of each key in the supplied map replaced by the corresponding value. This method shouldn't modify the original Substitutable, but rather construct a new instance, if changes are necessary. If this Substitutable does not contain any of the keys in the map, the method can and should return this.

Note that this method does not have to check if this object is itself a key in the substitution map and therefore has to be replaced. If you need that functionality, SubstUtils.substitute(Object, Map) should be used instead.

Specified by:
substitute in interface Substitutable
Returns:
the result of the substitution

JTP API Documentation