1 11 package org.eclipse.update.internal.core; 12 import org.eclipse.update.core.*; 13 17 public class FeaturePlugin { 18 private IPluginEntry pluginEntry; 19 private IFeature feature; 20 public FeaturePlugin(IPluginEntry entry, IFeature feature) { 21 pluginEntry = entry; 22 this.feature = feature; 23 } 24 public IPluginEntry getEntry() { 25 return pluginEntry; 26 } 27 public IFeature getFeature() { 28 return feature; 29 } 30 33 public boolean equals(Object o) { 34 if (o instanceof FeaturePlugin) { 35 FeaturePlugin p = (FeaturePlugin) o; 36 return getEntry().getVersionedIdentifier().equals(p.getEntry().getVersionedIdentifier()); 37 } 38 return false; 39 } 40 public int hashCode() { 41 return getEntry().getVersionedIdentifier().hashCode(); 42 } 43 public String toString() { 44 return pluginEntry + " in " + feature; } 46 } 47 | Popular Tags |