|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.caliper.util.ShortDuration
public abstract class ShortDuration
Represents a nonnegative duration from 0 to 100 days, with picosecond precision. Contrast with Joda-Time's duration class, which has only millisecond precision but can represent durations of millions of years.
Method Summary | |
---|---|
abstract ShortDuration |
dividedBy(BigDecimal divisor,
RoundingMode roundingMode)
Returns an instance of this type that represents this value divided by divisor , rounded according to roundingMode if necessary. |
abstract ShortDuration |
dividedBy(long divisor,
RoundingMode roundingMode)
Returns an instance of this type that represents this value divided by the integral value divisor , rounded according to roundingMode if necessary. |
abstract ShortDuration |
minus(ShortDuration subtrahend)
Returns an instance of this type that represents the difference of this value and subtrahend . |
static ShortDuration |
of(BigDecimal duration,
TimeUnit unit)
|
static ShortDuration |
of(long duration,
TimeUnit unit)
|
abstract ShortDuration |
plus(ShortDuration addend)
Returns an instance of this type that represents the sum of this value and addend . |
abstract ShortDuration |
times(BigDecimal multiplicand,
RoundingMode roundingMode)
Returns an instance of this type that represents the product of this value and multiplicand , rounded according to roundingMode if necessary. |
abstract ShortDuration |
times(long multiplicand)
Returns an instance of this type that represents the product of this value and the integral value multiplicand . |
long |
to(TimeUnit unit)
|
abstract long |
to(TimeUnit unit,
RoundingMode roundingMode)
|
static ShortDuration |
valueOf(String s)
|
static ShortDuration |
zero()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
public static ShortDuration of(long duration, TimeUnit unit)
public static ShortDuration of(BigDecimal duration, TimeUnit unit)
public static ShortDuration valueOf(String s)
public static ShortDuration zero()
public long to(TimeUnit unit)
public abstract long to(TimeUnit unit, RoundingMode roundingMode)
public abstract ShortDuration plus(ShortDuration addend)
addend
.
public abstract ShortDuration minus(ShortDuration subtrahend)
subtrahend
.
public abstract ShortDuration times(long multiplicand)
multiplicand
.
public abstract ShortDuration times(BigDecimal multiplicand, RoundingMode roundingMode)
multiplicand
, rounded according to roundingMode
if necessary.
If this class represents an amount that is "continuous" rather than discrete, the implementation of this method may simply ignore the rounding mode.
public abstract ShortDuration dividedBy(long divisor, RoundingMode roundingMode)
divisor
, rounded according to roundingMode
if necessary.
If this class represents an amount that is "continuous" rather than discrete, the implementation of this method may simply ignore the rounding mode.
public abstract ShortDuration dividedBy(BigDecimal divisor, RoundingMode roundingMode)
divisor
, rounded according to roundingMode
if necessary.
If this class represents an amount that is "continuous" rather than discrete, the implementation of this method may simply ignore the rounding mode.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |