public static Bit valueOf(String bit) throws NumberFormatException {
  final int i=Integer.parseInt(bit);
  if (i != 0 && i != 1) {
    throw new NumberFormatException("Input \"" + bit + "\" must be 0 or 1.");
  }
  return (i > 0) ? TRUE : FALSE;
}

public static Bit valueOf ( String bit ) throws NumberFormatException { final int i = Integer . parseInt ( bit ) ; if ( i != 0 && i != 1 ) { throw new NumberFormatException ( "Input \"" + bit + "\" must be 0 or 1." ) ; } return ( i > 0 ) ? TRUE : FALSE ; }
method to construct a bit for a given string expression .
