//package GregDLLSolver; //Author:Greg Viola //Class: Algos //Version: 2 //Due Date:4/10/07 //Status: Complete up to specifications import java.util.*; /** * Holds a linked list of integers. These integers correspond to boolean * variables. */ public class Clause { private LinkedList clause; /** * Constructor for clause. Initializes the list of ints. */ public Clause() { clause = new LinkedList (); } /** * Add an integer to the clause. * * @param x the integer to be added. */ public void add(int x) { clause.add(x); } /** * Return the list of integers. * * @return LinkedList the list of integers in the clause. */ public LinkedList getList() { return clause; } /** * Forms a string out of the clause. * * @return String the clause as a string. */ public String toString() { String result = "("; for (int i=0; i