@Override
  public boolean equals(Object obj) {
    if (obj instanceof MetricsInfo) {
      MetricsInfo other = (MetricsInfo) obj;
      return Objects.equal(name, other.name()) && Objects.equal(description, other.description());
    }
    return false;
  }
Making implementing metric info a little easier
hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/metrics/MetricsInfoImpl.java