@Test public void testEquals() { assertEquals(name("foo").tag("bar", "baz").tag("qux", "quux").build(), name("foo").tag("bar", "baz").tag("qux", "quux").build()); assertEquals(name("foo").tag("qux", "quux").tag("bar", "baz").build(), name("foo").tag("bar", "baz").tag("qux", "quux").build()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MetricName that = (MetricName) o; return name.equals(that.name) && tags.equals(that.tags); }
MetricName { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MetricName that = (MetricName) o; return name.equals(that.name) && tags.equals(that.tags); } }
MetricName { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MetricName that = (MetricName) o; return name.equals(that.name) && tags.equals(that.tags); } private  MetricName(String name, LinkedHashMap<String, String> tags); @JsonCreator private  MetricName(@JsonProperty("name") String name, @JsonProperty("tags") Map<String, String> tags); }
MetricName { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MetricName that = (MetricName) o; return name.equals(that.name) && tags.equals(that.tags); } private  MetricName(String name, LinkedHashMap<String, String> tags); @JsonCreator private  MetricName(@JsonProperty("name") String name, @JsonProperty("tags") Map<String, String> tags); MetricName withTag(String key, String value); static Builder name(String name); String getName(); Map<String, String> getTags(); @JsonIgnore List<String> getTagKeys(); @JsonIgnore List<String> getTagValues(); String toGraphiteName(); @Override boolean equals(Object o); @Override int hashCode(); boolean matches(MetricName other); @Override String toString(); }
MetricName { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MetricName that = (MetricName) o; return name.equals(that.name) && tags.equals(that.tags); } private  MetricName(String name, LinkedHashMap<String, String> tags); @JsonCreator private  MetricName(@JsonProperty("name") String name, @JsonProperty("tags") Map<String, String> tags); MetricName withTag(String key, String value); static Builder name(String name); String getName(); Map<String, String> getTags(); @JsonIgnore List<String> getTagKeys(); @JsonIgnore List<String> getTagValues(); String toGraphiteName(); @Override boolean equals(Object o); @Override int hashCode(); boolean matches(MetricName other); @Override String toString();  }