mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
CollationKey.java: Implement Comparable.
* 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. From-SVN: r37525
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user