@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof PluginInfoModelJson)) { return false; } final PluginInfoModelJson that = (PluginInfoModelJson) o; if (bundleSymbolicName != null ? !bundleSymbolicName.equals(that.bundleSymbolicName) : that.bundleSymbolicName != null) { return false; } if (state != null ? !state.equals(that.state) : that.state != null) { return false; } if (isSelectedForStart != that.isSelectedForStart) { return false; } if (pluginKey != null ? !pluginKey.equals(that.pluginKey) : that.pluginKey != null) { return false; } if (pluginName != null ? !pluginName.equals(that.pluginName) : that.pluginName != null) { return false; } if (version != null ? !version.equals(that.version) : that.version != null) { return false; } return !(services != null ? !services.equals(that.services) : that.services != null); }
@Override public int hashCode() { int result = bundleSymbolicName != null ? bundleSymbolicName.hashCode() : 0; result = 31 * result + (pluginKey != null ? pluginKey.hashCode() : 0); result = 31 * result + (pluginName != null ? pluginName.hashCode() : 0); result = 31 * result + (version != null ? version.hashCode() : 0); result = 31 * result + (state != null ? state.hashCode() : 0); result = 31 * result + (services != null ? services.hashCode() : 0); return result; } }
public PluginInfoJson(final PluginInfo input) { this(input.getBundleSymbolicName(), input.getPluginKey(), input.getPluginName(), input.getVersion(), input.getPluginState().name(), input.isSelectedForStart(), ImmutableSet.copyOf(Iterables.transform(input.getServices(), new Function<PluginServiceInfo, PluginServiceInfoJson>() { @Override public PluginServiceInfoJson apply(final PluginServiceInfo input) { return new PluginServiceInfoJson(input.getServiceTypeName(), input.getRegistrationName()); } }))); }
@Override public int hashCode() { int result = bundleSymbolicName != null ? bundleSymbolicName.hashCode() : 0; result = 31 * result + (pluginKey != null ? pluginKey.hashCode() : 0); result = 31 * result + (pluginName != null ? pluginName.hashCode() : 0); result = 31 * result + (version != null ? version.hashCode() : 0); result = 31 * result + (state != null ? state.hashCode() : 0); result = 31 * result + (services != null ? services.hashCode() : 0); return result; } }
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof PluginInfoModelJson)) { return false; } final PluginInfoModelJson that = (PluginInfoModelJson) o; if (bundleSymbolicName != null ? !bundleSymbolicName.equals(that.bundleSymbolicName) : that.bundleSymbolicName != null) { return false; } if (state != null ? !state.equals(that.state) : that.state != null) { return false; } if (isSelectedForStart != that.isSelectedForStart) { return false; } if (pluginKey != null ? !pluginKey.equals(that.pluginKey) : that.pluginKey != null) { return false; } if (pluginName != null ? !pluginName.equals(that.pluginName) : that.pluginName != null) { return false; } if (version != null ? !version.equals(that.version) : that.version != null) { return false; } return !(services != null ? !services.equals(that.services) : that.services != null); }