@Test(dataProvider = "printedValues") public void testToString(String expectedString, double value, TimeUnit unit) { assertEquals(new Duration(value, unit).toString(), expectedString); }
@JsonValue @Override public String toString() { return toString(unit); }
Duration implements Comparable<Duration> { @JsonValue @Override public String toString() { return toString(unit); } }
Duration implements Comparable<Duration> { @JsonValue @Override public String toString() { return toString(unit); } Duration(double value, TimeUnit unit); }
Duration implements Comparable<Duration> { @JsonValue @Override public String toString() { return toString(unit); } Duration(double value, TimeUnit unit); static Duration nanosSince(long start); static Duration succinctNanos(long nanos); static Duration succinctDuration(double value, TimeUnit unit); long toMillis(); double getValue(); TimeUnit getUnit(); double getValue(TimeUnit timeUnit); long roundTo(TimeUnit timeUnit); Duration convertToMostSuccinctTimeUnit(); @JsonValue @Override String toString(); String toString(TimeUnit timeUnit); @JsonCreator static Duration valueOf(String duration); @Override int compareTo(Duration o); @Override boolean equals(Object o); @Override int hashCode(); static TimeUnit valueOfTimeUnit(String timeUnitString); static String timeUnitToString(TimeUnit timeUnit); }
Duration implements Comparable<Duration> { @JsonValue @Override public String toString() { return toString(unit); } Duration(double value, TimeUnit unit); static Duration nanosSince(long start); static Duration succinctNanos(long nanos); static Duration succinctDuration(double value, TimeUnit unit); long toMillis(); double getValue(); TimeUnit getUnit(); double getValue(TimeUnit timeUnit); long roundTo(TimeUnit timeUnit); Duration convertToMostSuccinctTimeUnit(); @JsonValue @Override String toString(); String toString(TimeUnit timeUnit); @JsonCreator static Duration valueOf(String duration); @Override int compareTo(Duration o); @Override boolean equals(Object o); @Override int hashCode(); static TimeUnit valueOfTimeUnit(String timeUnitString); static String timeUnitToString(TimeUnit timeUnit);  }