@Test public void equality() { Metric m0 = new SimpleMetric(MetricName.valueOf("foobar"), MetricValue.fromIntValue(19)); Metric m1 = new SimpleMetric(MetricName.valueOf("foobar"), MetricValue.fromIntValue(19)); assertEquals(m0, m1); assertEquals(m0.hashCode(), m1.hashCode()); }
@Override public int hashCode() { int hash = 7; hash = 89 * hash + Objects.hashCode(this.name_); hash = 89 * hash + Objects.hashCode(this.value_); return hash; }
SimpleMetric implements Metric { @Override public int hashCode() { int hash = 7; hash = 89 * hash + Objects.hashCode(this.name_); hash = 89 * hash + Objects.hashCode(this.value_); return hash; } }
SimpleMetric implements Metric { @Override public int hashCode() { int hash = 7; hash = 89 * hash + Objects.hashCode(this.name_); hash = 89 * hash + Objects.hashCode(this.value_); return hash; } SimpleMetric(MetricName name, Boolean value);  SimpleMetric(MetricName name, Number value);  SimpleMetric(MetricName name, String value); @ConstructorProperties({ "name", "value" })  SimpleMetric(MetricName name, MetricValue value); }
SimpleMetric implements Metric { @Override public int hashCode() { int hash = 7; hash = 89 * hash + Objects.hashCode(this.name_); hash = 89 * hash + Objects.hashCode(this.value_); return hash; } SimpleMetric(MetricName name, Boolean value);  SimpleMetric(MetricName name, Number value);  SimpleMetric(MetricName name, String value); @ConstructorProperties({ "name", "value" })  SimpleMetric(MetricName name, MetricValue value); @Override MetricName getName(); @Override MetricValue getValue(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
SimpleMetric implements Metric { @Override public int hashCode() { int hash = 7; hash = 89 * hash + Objects.hashCode(this.name_); hash = 89 * hash + Objects.hashCode(this.value_); return hash; } SimpleMetric(MetricName name, Boolean value);  SimpleMetric(MetricName name, Number value);  SimpleMetric(MetricName name, String value); @ConstructorProperties({ "name", "value" })  SimpleMetric(MetricName name, MetricValue value); @Override MetricName getName(); @Override MetricValue getValue(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }