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
DefaultCNFSentence
public DefaultCNFSentence(Collection clauses)
clauses
public Collection clauses()
- Description copied from interface:
CNFSentence
- Returns the collection of
Clause
s 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