List of usage examples for java.util BitSet previousClearBit
public int previousClearBit(int fromIndex)
From source file:Main.java
public static void main(String[] args) { BitSet bitset1 = new BitSet(8); // assign values to bitset1 bitset1.set(0);/*from w w w .j ava2 s .co m*/ bitset1.set(1); bitset1.set(2); // print the sets System.out.println("Bitset1:" + bitset1.previousClearBit(1)); }
From source file:Test.java
public static void main(String[] args) { BitSet bitSet = new BitSet(); long[] array = { 1, 2, 3 }; bitSet = BitSet.valueOf(array); System.out.println(bitSet);//from ww w . j a va 2s . c o m long[] tmp = bitSet.toLongArray(); for (long number : tmp) { System.out.println(number); } System.out.println(bitSet.previousSetBit(1)); System.out.println(bitSet.previousClearBit(66)); }