Object/Class

com.twitter.util

Duration

Related Docs: class Duration | package util

Permalink

object Duration extends TimeLikeOps[Duration] with Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Duration
  2. Serializable
  3. Serializable
  4. TimeLikeOps
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val Bottom: Duration

    Permalink

    Duration Bottom is smaller than any other duration, except for itself.

    Duration Bottom is smaller than any other duration, except for itself. Bottom's complement is Top.

    Definition Classes
    DurationTimeLikeOps
  5. object Finite

    Permalink

    An extractor for finite TimeLikes; eg.:

    An extractor for finite TimeLikes; eg.:

    duration match {
      case Duration.Finite(d) => ...
      case Duration.Top => ..
    Definition Classes
    TimeLikeOps
  6. val NanosPerDay: Long

    Permalink
  7. val NanosPerHour: Long

    Permalink
  8. val NanosPerMicrosecond: Long

    Permalink
  9. val NanosPerMillisecond: Long

    Permalink
  10. val NanosPerMinute: Long

    Permalink
  11. val NanosPerSecond: Long

    Permalink
  12. object Nanoseconds

    Permalink

    An extractor for finite This, yielding its value in nanoseconds.

    An extractor for finite This, yielding its value in nanoseconds.

    duration match {
      case Duration.Nanoseconds(ns) => ...
      case Duration.Top => ...
    }
    Definition Classes
    TimeLikeOps
  13. val Top: Duration

    Permalink

    Duration Top is greater than any other duration, except for itself.

    Duration Top is greater than any other duration, except for itself. Top's complement is Bottom.

    Definition Classes
    DurationTimeLikeOps
  14. val Undefined: Duration

    Permalink

    An undefined value: behaves like Double.NaN

    An undefined value: behaves like Double.NaN

    Definition Classes
    DurationTimeLikeOps
  15. val Zero: Duration

    Permalink

    The zero value

    The zero value

    Definition Classes
    DurationTimeLikeOps
  16. def apply(value: Long, unit: TimeUnit): Duration

    Permalink

    Create a duration from a java.util.concurrent.TimeUnit.

  17. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. def fromFractionalSeconds(seconds: Double): Duration

    Permalink

    Make a new This from the given number of seconds.

    Make a new This from the given number of seconds. Because this method takes a Double, it can represent values less than a second. Note however that there is some slop in floating-point conversion that limits precision. Currently we can assume at least microsecond precision.

    Definition Classes
    DurationTimeLikeOps
  23. def fromMicroseconds(micros: Long): Duration

    Permalink
    Definition Classes
    DurationTimeLikeOps
  24. def fromMilliseconds(millis: Long): Duration

    Permalink
    Definition Classes
    DurationTimeLikeOps
  25. def fromNanoseconds(nanoseconds: Long): Duration

    Permalink

    Make a new This from the given number of nanoseconds

    Make a new This from the given number of nanoseconds

    Definition Classes
    DurationTimeLikeOps
  26. def fromSeconds(seconds: Int): Duration

    Permalink
    Definition Classes
    DurationTimeLikeOps
  27. def fromTimeUnit(value: Long, unit: TimeUnit): Duration

    Permalink

    Create a duration from a java.util.concurrent.TimeUnit.

    Create a duration from a java.util.concurrent.TimeUnit. Synonym for apply.

  28. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. def parse(s: String): Duration

    Permalink

    Parse a String representation of a duration.

    Parse a String representation of a duration. This method will parse any duration generated by Duration.toString.

    The format is either one of the special values, or non-empty sequence of durations. Each duration is a sign, an integer, a dot, and a unit. The unit may be plural or singular. The parser will ignore whitespace around signs and at the beginning and end. (That is, it accepts "1.second + 1.minute" and " 1.second ".) It's permissible to omit the sign before the first duration.

    The special values are "Duration.Top", "Duration.Bottom" and "Duration.Undefined".

    The parser is case-insensitive.

    Exceptions thrown

    RuntimeException if the string cannot be parsed.

  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from TimeLikeOps[Duration]

Inherited from AnyRef

Inherited from Any

Ungrouped