text: public static boolean allSubsetsEqual(Collection<BitSet> altsets) {Iterator<BitSet> it = altsets.iterator();BitSet first = it.next();while ( it.hasNext() ) {BitSet next = it.next();if ( !next.equals(first) ) return false;}return true;}