/* * Created on Oct 20, 2003 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package Cluedo.g6; import java.util.BitSet; class Disjunct { private BitSet disjunct; // indexed from 1 to n inclusive Disjunct(int n) { disjunct = new BitSet(n + 1); disjunct.set(1, n + 1); } Disjunct(int n, int[] indices) { this(n); set(indices, true); } void set(int index, boolean value) { disjunct.set(index, value); } boolean get(int index){ return disjunct.get(index); } void set(int[] indices, boolean value) { for (int i=0; i= 0; j = getNextSet(j + 1)) { indices[i++] = j; } return indices; } }