diff options
author | gjoranv <gv@verizonmedia.com> | 2019-05-07 15:58:04 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2019-05-10 10:56:39 +0200 |
commit | cf508533e0def83dcc4702d4ff83ad07e31f5b75 (patch) | |
tree | e173872e05ddc43aef1ce533e284f6cf1b18a9da /metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/MetricId.java | |
parent | 1e98247ac92f391bf8af18627354f2374255f32b (diff) |
New metrics-proxy
Diffstat (limited to 'metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/MetricId.java')
-rw-r--r-- | metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/MetricId.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/MetricId.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/MetricId.java new file mode 100644 index 00000000000..c93735c7fca --- /dev/null +++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/MetricId.java @@ -0,0 +1,39 @@ +/* +* Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + */ + +package ai.vespa.metricsproxy.metric.model; + +import java.util.Objects; + +/** + * @author gjoranv + */ +public class MetricId { + + public final String id; + private MetricId(String id) { this.id = id; } + + public static MetricId toMetricId(String id) { return new MetricId(id); } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MetricId metricId = (MetricId) o; + return Objects.equals(id, metricId.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + return "MetricId{" + + "id='" + id + '\'' + + '}'; + } + +} |