diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-17 20:44:03 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-17 20:44:03 +0000 |
| commit | 580b82bc48703ed0f56f3c2534b0a7294cabd7e6 (patch) | |
| tree | 0ca710082c0fee778050b7a6372e10201f7c22aa /libjava/java/text/CollationKey.java | |
| parent | 469ea67a3296430eb9039a155063191b9f62cc28 (diff) | |
| download | gcc-580b82bc48703ed0f56f3c2534b0a7294cabd7e6.tar.gz | |
* java/text/CollationKey.java: Implement Comparable.
(compareTo(Object)): New method.
* java/text/Collator.java (compare(Object,Object)): New method.
Implement Comparator.
* java/util/zip/InflaterInputStream.java (available): New method.
(close): New method.
(read, available, skip, fill): Throw exception if stream closed.
* java/util/zip/ZipInputStream.java (read, skip, readFully, fill,
getNextEntry): Throw exception if closed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37525 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/text/CollationKey.java')
| -rw-r--r-- | libjava/java/text/CollationKey.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libjava/java/text/CollationKey.java b/libjava/java/text/CollationKey.java index 725b66a8138..966c64d1c3f 100644 --- a/libjava/java/text/CollationKey.java +++ b/libjava/java/text/CollationKey.java @@ -1,6 +1,6 @@ // CollationKey.java - Sort key for locale-sensitive String. -/* Copyright (C) 1999 Free Software Foundation +/* Copyright (C) 1999, 2000 Free Software Foundation This file is part of libgcj. @@ -19,7 +19,7 @@ package java.text; * Status: Believed complete and correct. */ -public final class CollationKey +public final class CollationKey implements Comparable { public int compareTo (CollationKey target) { @@ -34,6 +34,11 @@ public final class CollationKey return key.length - target.key.length; } + public int compareTo (Object o) + { + return compareTo ((CollationKey) o); + } + public boolean equals (Object obj) { if (! (obj instanceof CollationKey)) |
