public final class TimeQuantities
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static javax.measure.Unit<javax.measure.quantity.Time> |
MICROSECOND |
static TransformedUnit<javax.measure.quantity.Time> |
MILLISECOND |
static TransformedUnit<javax.measure.quantity.Time> |
NANOSECOND |
| Modifier | Constructor and Description |
|---|---|
private |
TimeQuantities() |
| Modifier and Type | Method and Description |
|---|---|
static TemporalQuantity |
getQuantity(java.lang.Integer number,
java.time.temporal.TemporalUnit temporalUnit)
|
static TimeUnitQuantity |
getQuantity(java.lang.Integer number,
java.util.concurrent.TimeUnit timeUnit)
|
static javax.measure.Quantity<javax.measure.quantity.Time> |
getQuantity(java.time.LocalTime localTimeA,
java.time.LocalTime localTimeB)
Creates the
Quantity based in the difference of the two LocalTime |
static javax.measure.Quantity<javax.measure.quantity.Time> |
getQuantity(java.time.LocalTime localTimeA,
java.util.function.Supplier<java.time.temporal.TemporalAdjuster> supplier)
Creates the
Quantity based in the Temporal with Supplier |
static javax.measure.Quantity<javax.measure.quantity.Time> |
getQuantity(java.time.temporal.Temporal temporalA,
java.util.function.Supplier<java.time.temporal.TemporalAdjuster> supplier)
Creates the
Quantity based in the Temporal with TemporalAdjuster |
static javax.measure.Quantity<javax.measure.quantity.Time> |
getQuantity(java.time.temporal.Temporal temporalA,
java.time.temporal.Temporal temporalB)
Creates the
Quantity based in the difference of the two Temporal |
static TemporalQuantity |
toTemporalSeconds(javax.measure.Quantity<javax.measure.quantity.Time> quantity)
|
static TimeUnitQuantity |
toTimeUnitSeconds(javax.measure.Quantity<javax.measure.quantity.Time> quantity)
|
public static final javax.measure.Unit<javax.measure.quantity.Time> MICROSECOND
public static final TransformedUnit<javax.measure.quantity.Time> MILLISECOND
public static final TransformedUnit<javax.measure.quantity.Time> NANOSECOND
public static javax.measure.Quantity<javax.measure.quantity.Time> getQuantity(java.time.temporal.Temporal temporalA,
java.time.temporal.Temporal temporalB)
Quantity based in the difference of the two TemporaltemporalA - - First parameter to range, inclusivetemporalB - - second parameter to range, exclusiveUnits#DAY.java.time.temporal.UnsupportedTemporalTypeException - if some temporal doesn't support ChronoUnit.DAYSpublic static javax.measure.Quantity<javax.measure.quantity.Time> getQuantity(java.time.LocalTime localTimeA,
java.time.LocalTime localTimeB)
Quantity based in the difference of the two LocalTimelocalTimeA - - First parameter to range, inclusivelocalTimeB - - second parameter to range, exclusiveUnits#HOUR.java.time.temporal.UnsupportedTemporalTypeException - if some temporal doesn't support ChronoUnit.DAYSpublic static javax.measure.Quantity<javax.measure.quantity.Time> getQuantity(java.time.temporal.Temporal temporalA,
java.util.function.Supplier<java.time.temporal.TemporalAdjuster> supplier)
Quantity based in the Temporal with TemporalAdjustertemporalA - - temporalsupplier - the adjust @see TemporalAdjusterUnits#DAY.java.time.temporal.UnsupportedTemporalTypeException - if some temporal doesn't support ChronoUnit.DAYSpublic static javax.measure.Quantity<javax.measure.quantity.Time> getQuantity(java.time.LocalTime localTimeA,
java.util.function.Supplier<java.time.temporal.TemporalAdjuster> supplier)
Quantity based in the Temporal with SupplierlocalTimeA - supplier - he adjust @see TemporalAdjusterUnits#DAY.java.time.temporal.UnsupportedTemporalTypeException - if some temporal doesn't support ChronoUnit.DAYSLocalTime}public static TimeUnitQuantity getQuantity(java.lang.Integer number, java.util.concurrent.TimeUnit timeUnit)
value - - value to be usedtimeUnit - - time to be usedpublic static TemporalQuantity getQuantity(java.lang.Integer number, java.time.temporal.TemporalUnit temporalUnit)
value - - value to be usedtimeUnit - - time to be usedpublic static TimeUnitQuantity toTimeUnitSeconds(javax.measure.Quantity<javax.measure.quantity.Time> quantity)
quantity - - quantity to be usedTimeUnitQuantity converted be quantity in seconds.public static TemporalQuantity toTemporalSeconds(javax.measure.Quantity<javax.measure.quantity.Time> quantity)
quantity - - quantity to be usedTemporalQuantity converted be quantity in seconds.