Code example for BitSet

Methods: and, cardinality

0
	/** 
	 * Retains only the elements in this set that are contained in the specified {@code IntSet} using an {@code IntSet}-optimized process. 
	 */ 
	public boolean retainAll(IntSet ints) {
		int oldSize = size();
		bitSet.and(ints.bitSet);
		return oldSize != size();
	} 
 
	public int size() { 
		return bitSet.cardinality();
	} 
 
	/** 
	 * Wraps the provided {@code BitSet} as a {@link Set} returning the result. Any changes to the set will be reflected in {@code b} and vice-versa. 
	 */ 
	public static Set<Integer> wrap(BitSet b) {
		return new IntSet(b);
	} 
 
	@Override