harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r405704 - in /incubator/harmony/enhanced/classlib/trunk/modules/text/src: main/java/java/text/CollationKey.java test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
Date Wed, 10 May 2006 10:18:04 GMT
Author: tellison
Date: Wed May 10 03:17:54 2006
New Revision: 405704

URL: http://svn.apache.org/viewcvs?rev=405704&view=rev
Log:
Generic uplift for CollationKey, and remove test that is now a compile-time check.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/CollationKey.java
    incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/CollationKey.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/CollationKey.java?rev=405704&r1=405703&r2=405704&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/CollationKey.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/main/java/java/text/CollationKey.java
Wed May 10 03:17:54 2006
@@ -22,7 +22,7 @@
  * ordering of their source Strings. This is useful when the Strings must be
  * compared multiple times, as in sorting.
  */
-public final class CollationKey implements Comparable {
+public final class CollationKey implements Comparable<CollationKey> {
 
 	private String source;
 
@@ -45,23 +45,6 @@
 	 */
 	public int compareTo(CollationKey value) {
 		return icuKey.compareTo(value.icuKey);
-	}
-
-	/**
-	 * Compare this CollationKey to the specified Object to determine the
-	 * relative ordering.
-	 * 
-	 * @param object
-	 *            an Object
-	 * @return an int < 0 if this CollationKey is less than the specified
-	 *         CollationKey, 0 if they are equal, and > 0 if this CollationKey
-	 *         is greater
-	 * 
-	 * @exception ClassCastException
-	 *                when object is not a CollationKey
-	 */
-	public int compareTo(Object object) {
-		return icuKey.compareTo(((CollationKey) object).icuKey);
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java?rev=405704&r1=405703&r2=405704&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
Wed May 10 03:17:54 2006
@@ -249,11 +249,6 @@
         CollationKey key2 = coll.getCollationKey("abc");
 
         assertEquals(0, key.compareTo(key2));
-        Object key3 = key2;
-        assertEquals(0, key.compareTo(key3));
-        assertTrue(key.equals(key2));
-
-        key.toByteArray();
     }
 
     /**



Mime
View raw message