Github user kanakb commented on a diff in the pull request:
https://github.com/apache/helix/pull/21#discussion_r27347872
--- Diff: helix-ui/src/main/java/org/apache/helix/ui/api/ResourceSpec.java
---
@@ -0,0 +1,31 @@
+package org.apache.helix.ui.api;
+
+public class ResourceSpec extends ClusterSpec {
+ private final String resourceName;
+
+ public ResourceSpec(String zkAddress, String clusterName, String
resourceName) {
+ super(zkAddress, clusterName);
+ this.resourceName = resourceName;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (!(o instanceof ResourceSpec)) {
+ return false;
+ }
+ ResourceSpec c = (ResourceSpec) o;
+ return getZkAddress().equals(c.getZkAddress())
+ && getClusterName().equals(c.getClusterName())
+ && resourceName.equals(c.getResourceName());
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() + 27 * resourceName.hashCode();
--- End diff --
It lets you avoid doing things like adding constants like 27, but I agree
it's not a huge issue here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---