com.thinkaurelius.titan.core.attribute

## Interface Duration

- All Superinterfaces:
    Comparable<Duration>
  All Known Implementing Classes:
    StandardDuration, ZeroDuration

      public interface Duration
      extends Comparable<Duration>

  A length of time without any specific relationship to a calendar or standard clock.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Duration` | `add(Duration addend)` Returns a new duration that equals the combined length of this and the given duration in the unit of this duration.
    `long` | `getLength(TimeUnit unit)` Returns the length of this duration in the given `TimeUnit`.
    `TimeUnit` | `getNativeUnit()` Returns the native unit used by this duration.
    `boolean` | `isZeroLength()` Whether this duration is of zero length.
    `Duration` | `multiply(double multiplier)` Multiplies the length of this duration by the given multiplier.
    `Duration` | `sub(Duration subtrahend)` Returns a new duration that equals the length of this duration minus the length of the given duration in the unit of this duration.

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Method Detail

    - #### getLength

          long getLength(TimeUnit unit)

      Returns the length of this duration in the given `TimeUnit`.
      Parameters:
        `unit` -
      Returns:

    - #### isZeroLength

          boolean isZeroLength()

      Whether this duration is of zero length.
      Returns:

    - #### getNativeUnit

          TimeUnit getNativeUnit()

      Returns the native unit used by this duration. The actual time length is specified in this unit of time.
      Returns:

    - #### sub

          Duration sub(Duration subtrahend)

      Returns a new duration that equals the length of this duration minus the length of the given duration in the unit of this duration.
      Parameters:
        `subtrahend` -
      Returns:

    - #### add

          Duration add(Duration addend)

      Returns a new duration that equals the combined length of this and the given duration in the unit of this duration.
      Parameters:
        `addend` -
      Returns:

    - #### multiply

          Duration multiply(double multiplier)

      Multiplies the length of this duration by the given multiplier. The multiplier must be a non-negative number.
      Parameters:
        `multiplier` -
      Returns:

Copyright © 2012–2014. All rights reserved.