diff options
| author | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-19 17:03:15 +0000 |
|---|---|---|
| committer | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-19 17:03:15 +0000 |
| commit | 6fec1adc6432eeafcdea2ab165989e170cb6e64e (patch) | |
| tree | 9b478aacc6b13f1beadacec2ade096dcb732af53 /libjava/classpath/java/lang/Byte.java | |
| parent | abae7d71da9352babb77917224e837ffdfa118be (diff) | |
| download | ppe42-gcc-6fec1adc6432eeafcdea2ab165989e170cb6e64e.tar.gz ppe42-gcc-6fec1adc6432eeafcdea2ab165989e170cb6e64e.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194618 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/lang/Byte.java')
| -rw-r--r-- | libjava/classpath/java/lang/Byte.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libjava/classpath/java/lang/Byte.java b/libjava/classpath/java/lang/Byte.java index a1536e1be1b..01e0e03d2f6 100644 --- a/libjava/classpath/java/lang/Byte.java +++ b/libjava/classpath/java/lang/Byte.java @@ -370,4 +370,21 @@ public final class Byte extends Number implements Comparable<Byte> return value - b.value; } + /** + * Compares two unboxed byte 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(byte x, byte y) + { + return Byte.valueOf(x).compareTo(Byte.valueOf(y)); + } + } |

