import java.math.BigInteger;

public class JavaEnumToBits {

  enum orderedEnum {
    ONE,
    TWO,
    THREE,
    FOUR,
    FIVE,
    SIX,
    SEVEN,
    EIGHT
  }


  public static void main(String[] args) {
    long testBits = BigInteger.ZERO.longValue();
    BigInteger testInteger = BigInteger.valueOf(testBits);

    testInteger = testInteger.setBit(orderedEnum.ONE.ordinal());
    testInteger = testInteger.setBit(orderedEnum.FIVE.ordinal());
    testInteger = testInteger.setBit(orderedEnum.TWO.ordinal());
    testInteger = testInteger.setBit(orderedEnum.EIGHT.ordinal());


    System.out.println("JavaEnumToBits: testInteger = " + testInteger);

    for (orderedEnum val : orderedEnum.values()) {
      System.out.println("JavaEnumToBits: testBit(val) = " +
          testInteger.testBit(val.ordinal()));
    }

  }
}

@@ -426,19 +426,20 @@
 redEnum.
-FIV
+THRE
 E.ordina
@@ -493,19 +493,21 @@
 redEnum.
-TWO
+SEVEN
 .ordinal
@@ -579,17 +579,16 @@
 al());%0A%0A
-%0A
     Syst

Test of other setting values.