Interface DurationValue

All Superinterfaces:
com.google.gwt.user.client.rpc.IsSerializable, Serializable

public interface DurationValue extends com.google.gwt.user.client.rpc.IsSerializable, Serializable
Since:
3.9.0
  • Method Details

    • add

      @NotNull DurationValue add(@NotNull DurationValue value)
      This method does not call normalize(), so you should call it at the end of computation.
      Returns:
      new instance with the result of adding the values.
    • sub

      @NotNull DurationValue sub(@NotNull DurationValue value)
      This method does not call normalize(), so you should call it at the end of computation.
      Returns:
      new instance with the result subtracting the given value from this value
    • negate

      @NotNull DurationValue negate()
      This method does not call normalize(), so you should call it at the end of computation.
      Returns:
      new instance with the negated value
    • normalize

      @NotNull DurationValue normalize()
      Returns:
      new instance with the normalized value, which means that the hours part will no be bigger than one day
    • isZero

      boolean isZero()
    • isNegative

      boolean isNegative()
    • asDays

      float asDays()
      Returns:
      duration in days (including fractions and negative sign)
      Since:
      3.19.2
    • toStringDefaultFormat

      @NotNull String toStringDefaultFormat()
      Returns:
      String representation of the duration value in day + hours format
      Since:
      3.22.1