Rename SdkLabelSet to LabelSetSdk (#810)
Signed-off-by: Bogdan Cristian Drutu <bogdandrutu@gmail.com>
This commit is contained in:
parent
4e466cdf08
commit
c6dedcb136
|
@ -26,15 +26,15 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@AutoValue
|
@AutoValue
|
||||||
abstract class SdkLabelSet implements LabelSet {
|
abstract class LabelSetSdk implements LabelSet {
|
||||||
private static final LabelSet EMPTY =
|
private static final LabelSet EMPTY =
|
||||||
new AutoValue_SdkLabelSet(Collections.<String, String>emptyMap());
|
new AutoValue_LabelSetSdk(Collections.<String, String>emptyMap());
|
||||||
|
|
||||||
static LabelSet create(Map<String, String> labels) {
|
static LabelSet create(Map<String, String> labels) {
|
||||||
if (labels == null || labels.isEmpty()) {
|
if (labels == null || labels.isEmpty()) {
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
}
|
}
|
||||||
return new AutoValue_SdkLabelSet(unmodifiableMap(labels));
|
return new AutoValue_LabelSetSdk(unmodifiableMap(labels));
|
||||||
}
|
}
|
||||||
|
|
||||||
static LabelSet create(String... keyValuePairs) {
|
static LabelSet create(String... keyValuePairs) {
|
||||||
|
@ -49,7 +49,7 @@ abstract class SdkLabelSet implements LabelSet {
|
||||||
String key = keyValuePairs[i];
|
String key = keyValuePairs[i];
|
||||||
data.put(key, keyValuePairs[++i]);
|
data.put(key, keyValuePairs[++i]);
|
||||||
}
|
}
|
||||||
return new AutoValue_SdkLabelSet(Collections.unmodifiableMap(data));
|
return new AutoValue_LabelSetSdk(Collections.unmodifiableMap(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract Map<String, String> getLabels();
|
abstract Map<String, String> getLabels();
|
|
@ -95,11 +95,11 @@ final class MeterSdk implements Meter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LabelSet createLabelSet(String... keyValuePairs) {
|
public LabelSet createLabelSet(String... keyValuePairs) {
|
||||||
return SdkLabelSet.create(keyValuePairs);
|
return LabelSetSdk.create(keyValuePairs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LabelSet createLabelSet(Map<String, String> labels) {
|
public LabelSet createLabelSet(Map<String, String> labels) {
|
||||||
return SdkLabelSet.create(labels);
|
return LabelSetSdk.create(labels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue