1 11 package org.eclipse.update.internal.core; 12 13 import java.net.*; 14 15 16 17 21 public class URLKey { 22 23 private URL url; 24 25 28 public URLKey(URL url) { 29 super(); 30 this.url = url; 31 } 32 33 36 public boolean equals(Object obj) { 37 if (obj == null) { 38 return false; 39 } 40 41 if (this == obj) { 42 return true; 43 } 44 45 if (obj instanceof URLKey) { 46 return equals(((URLKey) obj).getURL()); 47 } 48 49 if (!(obj instanceof URL)) { 50 return false; 51 } 52 53 URL url2 = (URL)obj; 54 if (url == url2) { 55 return true; 56 } 57 58 return UpdateManagerUtils.sameURL(url,url2); 59 } 60 61 64 public int hashCode() { 65 return url.hashCode(); 66 } 67 68 72 public URL getURL() { 73 return url; 74 } 75 76 } 77 | Popular Tags |