home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / lang / Double.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  2.2 KB  |  110 lines

  1. package java.lang;
  2.  
  3. public final class Double extends Number implements Comparable {
  4.    public static final double POSITIVE_INFINITY = (double)Float.POSITIVE_INFINITY;
  5.    public static final double NEGATIVE_INFINITY = (double)Float.NEGATIVE_INFINITY;
  6.    public static final double NaN = NaN;
  7.    public static final double MAX_VALUE = 1.7976931348623157E308;
  8.    public static final double MIN_VALUE = longBitsToDouble(1L);
  9.    public static final Class TYPE = Class.getPrimitiveClass("double");
  10.    private double value;
  11.    private static final long serialVersionUID = -9172774392245257468L;
  12.  
  13.    public static String toString(double var0) {
  14.       return (new FloatingDecimal(var0)).toJavaFormatString();
  15.    }
  16.  
  17.    public static Double valueOf(String var0) throws NumberFormatException {
  18.       return new Double(FloatingDecimal.readJavaFormatString(var0).doubleValue());
  19.    }
  20.  
  21.    public static double parseDouble(String var0) throws NumberFormatException {
  22.       return FloatingDecimal.readJavaFormatString(var0).doubleValue();
  23.    }
  24.  
  25.    public static boolean isNaN(double var0) {
  26.       return var0 != var0;
  27.    }
  28.  
  29.    public static boolean isInfinite(double var0) {
  30.       return var0 == POSITIVE_INFINITY || var0 == NEGATIVE_INFINITY;
  31.    }
  32.  
  33.    public Double(double var1) {
  34.       this.value = var1;
  35.    }
  36.  
  37.    public Double(String var1) throws NumberFormatException {
  38.       this(valueOf(var1));
  39.    }
  40.  
  41.    public boolean isNaN() {
  42.       return isNaN(this.value);
  43.    }
  44.  
  45.    public boolean isInfinite() {
  46.       return isInfinite(this.value);
  47.    }
  48.  
  49.    public String toString() {
  50.       return String.valueOf(this.value);
  51.    }
  52.  
  53.    public byte byteValue() {
  54.       return (byte)((int)this.value);
  55.    }
  56.  
  57.    public short shortValue() {
  58.       return (short)((int)this.value);
  59.    }
  60.  
  61.    public int intValue() {
  62.       return (int)this.value;
  63.    }
  64.  
  65.    public long longValue() {
  66.       return (long)this.value;
  67.    }
  68.  
  69.    public float floatValue() {
  70.       return (float)this.value;
  71.    }
  72.  
  73.    public double doubleValue() {
  74.       return this.value;
  75.    }
  76.  
  77.    public int hashCode() {
  78.       long var1 = doubleToLongBits(this.value);
  79.       return (int)(var1 ^ var1 >>> 32);
  80.    }
  81.  
  82.    public boolean equals(Object var1) {
  83.       return var1 instanceof Double && doubleToLongBits(((Double)var1).value) == doubleToLongBits(this.value);
  84.    }
  85.  
  86.    public static native long doubleToLongBits(double var0);
  87.  
  88.    public static native long doubleToRawLongBits(double var0);
  89.  
  90.    public static native double longBitsToDouble(long var0);
  91.  
  92.    public int compareTo(Double var1) {
  93.       double var2 = this.value;
  94.       double var4 = var1.value;
  95.       if (var2 < var4) {
  96.          return -1;
  97.       } else if (var2 > var4) {
  98.          return 1;
  99.       } else {
  100.          long var6 = doubleToLongBits(var2);
  101.          long var8 = doubleToLongBits(var4);
  102.          return var6 == var8 ? 0 : (var6 < var8 ? -1 : 1);
  103.       }
  104.    }
  105.  
  106.    public int compareTo(Object var1) {
  107.       return this.compareTo((Double)var1);
  108.    }
  109. }
  110.