@Test public void configString() { final MetricValue empty = MetricValue.EMPTY; final MetricValue boolval = MetricValue.fromBoolean(true); final MetricValue intval = MetricValue.fromIntValue(1L); final MetricValue fltval = MetricValue.fromDblValue(1D); final MetricValue strval = MetricValue.fromStrValue("1 \u0700 \37 \n \f \r \"\'"); assertNull(empty.configString()); assertEquals("true", boolval.configString()); assertEquals("1", intval.configString()); assertEquals(Double.toString(1), fltval.configString()); assertEquals("\"1 \\u0700 \\037 \\n \\f \\r \\\"'\"", strval.configString()); }
public abstract String configString();
MetricValue implements Comparable<MetricValue>, Serializable { public abstract String configString(); }
MetricValue implements Comparable<MetricValue>, Serializable { public abstract String configString(); private  MetricValue(); }
MetricValue implements Comparable<MetricValue>, Serializable { public abstract String configString(); private  MetricValue(); static MetricValue fromBoolean(boolean b); static MetricValue fromIntValue(long int_value); static MetricValue fromDblValue(double flt_value); static MetricValue fromStrValue(String str_value); static MetricValue fromHistValue(Histogram hist_value); static MetricValue fromNumberValue(Number number); @Override abstract int compareTo(MetricValue o); abstract Optional<Number> value(); abstract Optional<Boolean> asBool(); abstract Optional<String> asString(); Optional<String> stringValue(); Optional<Histogram> histogram(); Boolean getBoolValue(); Long getIntValue(); Double getFltValue(); String getStrValue(); Histogram getHistValue(); abstract String configString(); @Override String toString(); @Override abstract boolean equals(Object o); @Override abstract int hashCode(); boolean isPresent(); boolean isInfinite(); boolean isNaN(); boolean isInfiniteOrNaN(); }
MetricValue implements Comparable<MetricValue>, Serializable { public abstract String configString(); private  MetricValue(); static MetricValue fromBoolean(boolean b); static MetricValue fromIntValue(long int_value); static MetricValue fromDblValue(double flt_value); static MetricValue fromStrValue(String str_value); static MetricValue fromHistValue(Histogram hist_value); static MetricValue fromNumberValue(Number number); @Override abstract int compareTo(MetricValue o); abstract Optional<Number> value(); abstract Optional<Boolean> asBool(); abstract Optional<String> asString(); Optional<String> stringValue(); Optional<Histogram> histogram(); Boolean getBoolValue(); Long getIntValue(); Double getFltValue(); String getStrValue(); Histogram getHistValue(); abstract String configString(); @Override String toString(); @Override abstract boolean equals(Object o); @Override abstract int hashCode(); boolean isPresent(); boolean isInfinite(); boolean isNaN(); boolean isInfiniteOrNaN(); static final MetricValue TRUE; static final MetricValue FALSE; static final Optional<MetricValue> OPTIONAL_TRUE; static final Optional<MetricValue> OPTIONAL_FALSE; static MetricValue EMPTY; }