/*
 * Java core library component.
 *
 * Copyright (c) 1997, 1998
 *      Transvirtual Technologies, Inc.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file.
 */

package java.text;

import java.lang.String;

public final class CollationKey implements Comparable {

private String str;
private Collator target;

private CollationKey() {}
    
public int compareTo(Object obj) {
	return compareTo((CollationKey)obj);
}

public int compareTo(CollationKey other) {
	if (target != other.target) {
		return (-1);
	}
	else {
		return (target.compare(str, other.str));
	}
}

public boolean equals(Object obj) {
	return (obj instanceof CollationKey)
		&& compareTo((CollationKey)obj) == 0;
}

public String getSourceString() {
	return (str);
}

public int hashCode() {
	return (super.hashCode());
}

public byte[] toByteArray() {
	return (str.getBytes());
}

}

@@ -246,34 +246,8 @@
 t;%0A%0A
-import java.lang.String;%0A%0A
 publ
@@ -307,16 +307,22 @@
 private 
+final 
 String s
@@ -329,24 +329,30 @@
 tr;%0Aprivate 
+final 
 Collator tar
@@ -357,24 +357,16 @@
 arget;%0A%0A
-private 
 Collatio
@@ -374,17 +374,81 @@
 Key(
-) %7B%7D%0A    
+Collator target, String str) %7B%0A%09this.target = target;%0A%09this.str = str;%0A%7D%0A
 %0Apub
@@ -600,33 +600,84 @@
 %7B%0A%09%09
-return (-1);%0A%09%7D%0A%09else %7B%0A%09
+throw new IllegalArgumentException(%0A%09%09%09%22keys have different Collators%22);%0A%09%7D%0A
 %09ret
@@ -714,19 +714,16 @@
 .str));%0A
-%09%7D%0A
 %7D%0A%0Apubli

Add package constructor.