1 11 package org.eclipse.update.internal.ui.model; 12 13 import org.eclipse.update.configuration.*; 14 15 19 public class ConfiguredSiteAdapter 20 extends UIModelObject 21 implements IConfiguredSiteAdapter { 22 private IInstallConfiguration config; 23 private IConfiguredSite csite; 24 25 public ConfiguredSiteAdapter(IInstallConfiguration config, IConfiguredSite csite) { 26 this.csite = csite; 27 this.config = config; 28 } 29 30 public IConfiguredSite getConfiguredSite() { 31 return csite; 32 } 33 34 public IInstallConfiguration getInstallConfiguration() { 35 return config; 36 } 37 38 public boolean equals(Object object) { 39 if (object==null) return false; 40 if (object == this) return true; 41 if (object instanceof ConfiguredSiteAdapter) { 42 ConfiguredSiteAdapter adapter = (ConfiguredSiteAdapter)object; 43 return csite!=null && csite.getSite().equals(adapter.getConfiguredSite().getSite()); 44 } 45 return false; 46 } 47 48 public String toString() { 49 return getConfiguredSite().getSite().getURL().toString(); 50 } 51 } 52 | Popular Tags |