/** * Create a new conjunction of clauses by taking the clauses from the * current conjunction and adding additional clauses to it. * * @param additionalClauses * the additional clauses to be added to the existing set of * clauses in order to create a new conjunction. * @return a new conjunction of clauses containing the existing and * additional clauses passed in. */ public ConjunctionOfClauses extend(ICollection <Clause> additionalClauses) { ISet <Clause> extendedClauses = CollectionFactory.CreateSet <Clause>(); extendedClauses.AddAll(clauses); extendedClauses.AddAll(additionalClauses); ConjunctionOfClauses result = new ConjunctionOfClauses(extendedClauses); return(result); }
public override bool Equals(object othObj) { if (null == othObj) { return(false); } if (this == othObj) { return(true); } if (!(othObj is ConjunctionOfClauses)) { return(false); } ConjunctionOfClauses othConjunctionOfClauses = (ConjunctionOfClauses)othObj; return(othConjunctionOfClauses.clauses.Equals(this.clauses)); }