aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/java/lang/Boolean.java
diff options
context:
space:
mode:
authorMatthias Klose <doko@gcc.gnu.org>2012-12-19 17:03:15 +0000
committerMatthias Klose <doko@gcc.gnu.org>2012-12-19 17:03:15 +0000
commita1906e8bbfa426ed1adfe751608bc74f1d4d2ab7 (patch)
tree9b478aacc6b13f1beadacec2ade096dcb732af53 /libjava/classpath/java/lang/Boolean.java
parentbaeb2e16475b278e83fe73751d4f0f572805b16e (diff)
downloadgcc-a1906e8bbfa426ed1adfe751608bc74f1d4d2ab7.zip
gcc-a1906e8bbfa426ed1adfe751608bc74f1d4d2ab7.tar.gz
gcc-a1906e8bbfa426ed1adfe751608bc74f1d4d2ab7.tar.bz2
Import GNU Classpath (20121202).
2012-12-19 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (20121202). * Regenerate class and header files. * Regenerate auto* files. * sources.am, gcj/javaprims.h: Regenerate. * gnu/java/nio/FileLockImpl.java (close): New override. From-SVN: r194618
Diffstat (limited to 'libjava/classpath/java/lang/Boolean.java')
-rw-r--r--libjava/classpath/java/lang/Boolean.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/libjava/classpath/java/lang/Boolean.java b/libjava/classpath/java/lang/Boolean.java
index f2eaf41..0e4afa8 100644
--- a/libjava/classpath/java/lang/Boolean.java
+++ b/libjava/classpath/java/lang/Boolean.java
@@ -237,6 +237,21 @@ public final class Boolean implements Serializable, Comparable<Boolean>
}
/**
+ * Compares two unboxed boolean values.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ * @return 0 if both Booleans represent the same value, a positive number
+ * if this Boolean represents true and the other false, and a negative
+ * number otherwise.
+ * @since 1.7
+ */
+ public static int compare(boolean x, boolean y)
+ {
+ return Boolean.valueOf(x).compareTo(Boolean.valueOf(y));
+ }
+
+ /**
* If the String argument is "true", ignoring case, return true.
* Otherwise, return false.
*