aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/java/lang/Character.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/Character.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/Character.java')
-rw-r--r--libjava/classpath/java/lang/Character.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/libjava/classpath/java/lang/Character.java b/libjava/classpath/java/lang/Character.java
index 05e641c..f87cde6 100644
--- a/libjava/classpath/java/lang/Character.java
+++ b/libjava/classpath/java/lang/Character.java
@@ -4200,6 +4200,23 @@ public final class Character implements Serializable, Comparable<Character>
}
/**
+ * Compares two unboxed char values.
+ * The result is positive if the first is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ *
+ * @param x First value to compare.
+ * @param y Second value to compare.
+ *
+ * @return positive int if the first value is greater, negative if the second
+ * is greater, and 0 if the two are equal.
+ * @since 1.7
+ */
+ public static int compare(char x, char y)
+ {
+ return Character.valueOf(x).compareTo(Character.valueOf(y));
+ }
+
+ /**
* Returns an <code>Character</code> object wrapping the value.
* In contrast to the <code>Character</code> constructor, this method
* will cache some values. It is used by boxing conversion.