package java.lang {
import java.io.Serializable;
import java.lang.Arguments;
dynamic public class Boolean__ implements Comparable, Serializable {
  public static var TYPE: java.lang.Class__ = new java.lang.Class__(new Arguments(java.lang.Class__.Class____Ljava_lang_String_2, ["boolean"]));
  public static var FALSE: Boolean__ = new Boolean__(new Arguments(java.lang.Boolean__.Boolean____Z, [false]));
  public static var TRUE: Boolean__ = new Boolean__(new Arguments(java.lang.Boolean__.Boolean____Z, [true]));
  private var value: Boolean;
  public static function parseBoolean__Ljava_lang_String_2(s: String): Boolean {
    return Object("true").equalsIgnoreCase__Ljava_lang_String_2(s);
  }
  public static function toString__Z(x: Boolean): String {
    return Object(String).valueOf__Z(x);
  }
  public static function valueOf__Z(b: Boolean): Boolean__ {
    return b ? TRUE : FALSE;
  }
  public static function valueOf__Ljava_lang_String_2(s: String): Boolean__ {
    return valueOf__Z(parseBoolean__Ljava_lang_String_2(s));
  }
  public function Boolean____Z(value: Boolean): Object {
    this.value = value;
    return this;
  }
  public function Boolean____Ljava_lang_String_2(s: String): Object {
    return this;
  }
  public function booleanValue__(): Boolean {
    return value;
  }
  public function compareTo__Ljava_lang_Boolean_2(other: Boolean__): int {
    return (this.value == other.value) ? 0 : (this.value ? 1 : -1);
  }
  public function equals__Ljava_lang_Object_2(o: Object): Boolean {
    return (o is Boolean__) && ((Boolean__(o)).value == value);
  }
  public function hashCode__(): int {
    return value ? 1231 : 1237;
  }
  public function toString__(): String {
    return value ? "true" : "false";
  }
  public function compareTo__Ljava_lang_Object_2(arg0: Object): int {
    return arg0.compareTo__Ljava_lang_Boolean_2();
  }
  public function Boolean__(... vargs) {
    var args: Array;
    var id: int;
    if (vargs.length == 1 && vargs[0] is Arguments) {
      args = Arguments(vargs[0]).args;
      id = Arguments(vargs[0]).id;
    } else {
      if (vargs.length == 1 && vargs[0] is Boolean) {
        args = vargs;
        id = 0;
      } else if (vargs.length == 1 && vargs[0] is String) {
        args = vargs;
        id = 1;
      }
    }
    switch (id) {
      case 0:
        var args0: Array = [args[0]];
        break;
      case 1:
        var args1: Array = [args[0]];
        args0 = [Boolean__.parseBoolean__Ljava_lang_String_2(args1[0])];
        break;
    }
    super();
    switch (id) {
      case 0:
        Boolean____Z(args0[0]);
        break;
      case 1:
        Boolean____Z(args0[0]);
        Boolean____Ljava_lang_String_2(args1[0]);
        break;
    }
  }
  public static const Boolean____Z : int = 0;
  public static const Boolean____Ljava_lang_String_2 : int = 1;
}
}
