package java.lang {
import java.lang.Arguments;
import java.lang.JavaArray;
dynamic public class Byte extends Number__ implements Comparable {
  public static var TYPE: java.lang.Class__ = new java.lang.Class__(new Arguments(java.lang.Class__.Class____Ljava_lang_String_2, ["byte"]));
  public static const MIN_VALUE: int = int(0x80);
  public static const MAX_VALUE: int = int(0x7F);
  public static const SIZE: int = 8;
  private var value: int;
  public static function decode__Ljava_lang_String_2(s: String): Byte {
    return new Byte(new Arguments(java.lang.Byte.Byte__B, [int(Number__.__decodeAndValidateInt__Ljava_lang_String_2II(s, -128, 127))]));
  }
  public static function hashCode__B(b: int): int {
    return b;
  }
  public static function parseByte__Ljava_lang_String_2(s: String): int {
    var baseTen: int = 10;
    return parseByte__Ljava_lang_String_2I(s, 10);
  }
  public static function parseByte__Ljava_lang_String_2I(s: String, radix: int): int {
    return int(Number__.__parseAndValidateInt__Ljava_lang_String_2III(s, radix, -128, 127));
  }
  public static function toString__B(b: int): String {
    return Object(String).valueOf__I(b);
  }
  public static function valueOf__B(b: int): Byte {
    var rebase: int = b + 128;
    var result: Byte = Byte$BoxedValues.access$0()[rebase];
    if (result === null) {
      result = Byte$BoxedValues.access$0()[rebase] = new Byte(new Arguments(java.lang.Byte.Byte__B, [b]));
    }
    return result;
  }
  public static function valueOf__Ljava_lang_String_2(s: String): Byte {
    return new Byte(new Arguments(java.lang.Byte.Byte__B, [parseByte__Ljava_lang_String_2(s)]));
  }
  public static function valueOf__Ljava_lang_String_2I(s: String, radix: int): Byte {
    return new Byte(new Arguments(java.lang.Byte.Byte__B, [parseByte__Ljava_lang_String_2I(s, radix)]));
  }
  public function Byte__B(value: int): Object {
    this.value = value;
    return this;
  }
  public function Byte__Ljava_lang_String_2(s: String): Object {
    value = Byte.parseByte__Ljava_lang_String_2(s);
    return this;
  }
  public override function byteValue__(): int {
    return value;
  }
  public function compareTo__Ljava_lang_Byte_2(b: Byte): int {
    if (value < b.value) {
      return -1;
    } else if (value > b.value) {
      return 1;
    } else {
      return 0;
    }
    return 0;
  }
  public override function doubleValue__(): Number {
    return value;
  }
  public function equals__Ljava_lang_Object_2(o: Object): Boolean {
    return (o is Byte) && ((Byte(o)).value == value);
  }
  public override function floatValue__(): Number {
    return value;
  }
  public function hashCode__(): int {
    return Byte.hashCode__B(value);
  }
  public override function intValue__(): int {
    return value;
  }
  public override function longValue__(): Number {
    return value;
  }
  public override function shortValue__(): int {
    return value;
  }
  public function toString__(): String {
    return Byte.toString__B(value);
  }
  public function compareTo__Ljava_lang_Object_2(arg0: Object): int {
    return arg0.compareTo__Ljava_lang_Byte_2();
  }
  public function Byte(... 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 int) {
        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]];
        break;
    }
    super();
    switch (id) {
      case 0:
        Byte__B(args0[0]);
        break;
      case 1:
        Byte__Ljava_lang_String_2(args1[0]);
        break;
    }
  }
  public static const Byte__B : int = 0;
  public static const Byte__Ljava_lang_String_2 : int = 1;
}
}
