package org.terracotta.statistics.registry;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public final class ValueStatisticDescriptor {
private final String observerName;
private final Set<String> tags;
private ValueStatisticDescriptor(String observerName, Set<String> tags) {
this.observerName = observerName;
this.tags = Collections.unmodifiableSet(tags);
}
public String getObserverName() {
return observerName;
}
public Set<String> getTags() {
return tags;
}
public static ValueStatisticDescriptor descriptor(String observerName, Set<String> tags) {
return new ValueStatisticDescriptor(observerName, tags);
}
public static ValueStatisticDescriptor descriptor(String observerName, String... tags) {
return new ValueStatisticDescriptor(observerName, new HashSet<>(Arrays.asList(tags)));
}
}