/** * 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(); }
/** * 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(); }
/** * Add a clause set listener. * * @param l the listener */ public void addClauseSetChangeListener(ClauseSetChangeListener l) { delegate.addClauseSetChangeListener(l); }
/** * Get the predicates. * * @return an iterator iterating over the predicates */ public Iterator predicates() { return delegate.predicates(); }
/** * 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); }
/** * Get the hash code of this object. * * @return the hash code */ public int hashCode() { return delegate == null ? 0 : delegate.hashCode(); }
/** * 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); }