From 0ec230497b1b1bb1c45558cc5af33f89462fc12a Mon Sep 17 00:00:00 2001 From: lostdj Date: Wed, 19 Nov 2014 14:27:11 +0300 Subject: [PATCH] Added missing MIX/MAX_VALUE for basic types. --- classpath/java/lang/Byte.java | 3 +++ classpath/java/lang/Double.java | 3 +++ classpath/java/lang/Float.java | 5 ++++- classpath/java/lang/Short.java | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/classpath/java/lang/Byte.java b/classpath/java/lang/Byte.java index 13a8b1dbef..cda92676b1 100644 --- a/classpath/java/lang/Byte.java +++ b/classpath/java/lang/Byte.java @@ -13,6 +13,9 @@ package java.lang; public final class Byte extends Number implements Comparable { public static final Class TYPE = avian.Classes.forCanonicalName("B"); + public static final byte MIN_VALUE = -128; + public static final byte MAX_VALUE = 127; + private final byte value; public Byte(byte value) { diff --git a/classpath/java/lang/Double.java b/classpath/java/lang/Double.java index 2e6fedd3a3..e1875355cc 100644 --- a/classpath/java/lang/Double.java +++ b/classpath/java/lang/Double.java @@ -17,6 +17,9 @@ public final class Double extends Number { public static final double POSITIVE_INFINITY = 1.0 / 0.0; public static final double NaN = 0.0 / 0.0; + public static final double MIN_VALUE = 2.22507385850720138309e-308; + public static final double MAX_VALUE = 1.79769313486231570815e+308; + private final double value; public Double(String value) { diff --git a/classpath/java/lang/Float.java b/classpath/java/lang/Float.java index 17795fdcc3..e8a41b07d7 100644 --- a/classpath/java/lang/Float.java +++ b/classpath/java/lang/Float.java @@ -18,7 +18,10 @@ public final class Float extends Number { public static final float NEGATIVE_INFINITY = -1.0f / 0.0f; public static final float POSITIVE_INFINITY = 1.0f / 0.0f; public static final float NaN = 0.0f / 0.0f; - + + public static final float MIN_VALUE = 1.17549435082228750797e-38f; + public static final float MAX_VALUE = 3.40282346638528859812e+38f; + private final float value; public Float(String value) { diff --git a/classpath/java/lang/Short.java b/classpath/java/lang/Short.java index c9d7abc324..fb56c74621 100644 --- a/classpath/java/lang/Short.java +++ b/classpath/java/lang/Short.java @@ -12,6 +12,8 @@ package java.lang; public final class Short extends Number implements Comparable { public static final Class TYPE = avian.Classes.forCanonicalName("S"); + + public static final short MIN_VALUE = -32768; public static final short MAX_VALUE = 32767; private final short value;