Class DurationLogInfo

java.lang.Object
com.dropbox.core.v2.teamlog.DurationLogInfo

public class DurationLogInfo extends Object
Represents a time duration: unit and amount
  • Field Details

    • unit

      @Nonnull protected final TimeUnit unit
    • amount

      protected final long amount
  • Constructor Details

    • DurationLogInfo

      public DurationLogInfo(@Nonnull TimeUnit unit, long amount)
      Represents a time duration: unit and amount
      Parameters:
      unit - Time unit. Must not be null.
      amount - Amount of time.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getUnit

      @Nonnull public TimeUnit getUnit()
      Time unit.
      Returns:
      value for this field, never null.
    • getAmount

      public long getAmount()
      Amount of time.
      Returns:
      value for this field.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

      public String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.

      The returned String may contain newlines.

      Returns:
      Formatted, multiline String representation of this object