added hashCode and compareTo to new URL class

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2301 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent abb5264929
commit 4bd626572b

@ -222,6 +222,14 @@ public class URL {
((this.port == other.port )));
}
public int hashCode() {
return this.toString().hashCode();
}
public int compareTo(Object h) {
assert (h instanceof URL);
return this.toString().compareTo(((URL) h).toString());
}
public static void main(String[] args) {
URL u;

Loading…
Cancel
Save