Ejemplo n.º 1
0
 /**
  * Get a key for indexing. The knowledge base is supposed to contain only clauses having the same
  * key object. This method returns this key object. Note that this behavior is not enforced!
  *
  * @see org.mandarax.kernel.Fact#getKey
  * @see org.mandarax.kernel.Rule#getKey
  * @return the key object
  */
 public Object getKey() {
   return delegate.getKey();
 }
Ejemplo n.º 2
0
 /**
  * Iterate over all clauses.
  *
  * @return a clause iterator
  * @exception ClauseSetException
  */
 public org.mandarax.util.ClauseIterator clauses() throws ClauseSetException {
   return delegate == null ? new EmptyClauseIterator() : delegate.clauses();
 }
Ejemplo n.º 3
0
 /**
  * Add a clause set listener.
  *
  * @param l the listener
  */
 public void addClauseSetChangeListener(ClauseSetChangeListener l) {
   delegate.addClauseSetChangeListener(l);
 }
Ejemplo n.º 4
0
 /**
  * Get the predicates.
  *
  * @return an iterator iterating over the predicates
  */
 public Iterator predicates() {
   return delegate.predicates();
 }
Ejemplo n.º 5
0
 /**
  * Compare objects.
  *
  * @param obj another object
  * @return a boolean
  */
 public boolean equals(Object obj) {
   if (obj == null || !(obj.getClass() == getClass())) return false;
   return delegate.equals(((WrappedClauseSet) obj).delegate);
 }
Ejemplo n.º 6
0
 /**
  * Get the hash code of this object.
  *
  * @return the hash code
  */
 public int hashCode() {
   return delegate == null ? 0 : delegate.hashCode();
 }
Ejemplo n.º 7
0
 /**
  * Get an iterator for clauses. T
  *
  * @return a clause iterator
  * @param query the query clause
  * @param additionalParameter an optional additional parameter
  * @exception ClauseSetException
  */
 public org.mandarax.util.ClauseIterator clauses(Clause query, Object additionalParameter)
     throws ClauseSetException {
   return delegate == null
       ? new EmptyClauseIterator()
       : delegate.clauses(query, additionalParameter);
 }