Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.common.math
Class Duration.Components

    java.lang.Object
      org.modeshape.common.math.Duration.Components

Enclosing class:
  Duration

    public class Duration.Components

extends Object

The atomic components of this duration, broken down into whole hours, minutes and (fractional) seconds.

Constructor Summary
`protected` | `Duration.Components(int hours, int minutes, double seconds)`

Method Summary
`int` | `getHours()` Get the whole hours in this duration.
`int` | `getMinutes()` Get the whole minutes in this duration.
`double` | `getSeconds()` Get the duration's seconds component.
`String` | `toString()` Return the duration as a string in a form containing hours, minutes, and seconds, including the fractional part of the seconds.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Duration.Components

    protected Duration.Components(int hours,
                                  int minutes,
                                  double seconds)

Method Detail

### getHours

    public int getHours()

  Get the whole hours in this duration.

  Returns:
    the hours

### getMinutes

    public int getMinutes()

  Get the whole minutes in this duration.

  Returns:
    the minutes, from 0 to 59.

### getSeconds

    public double getSeconds()

  Get the duration's seconds component.

  Returns:
    the number of seconds, including fractional part.

### toString

    public String toString()

  Return the duration as a string in a form containing hours, minutes, and seconds, including the fractional part of the seconds. The format is essentially `HHH:MM:SS.mmm`, where
  HHH
    is the number of hours written in at least 2 digits (e.g., "03")
  MM
    is the number of hours written in at least 2 digits (e.g., "03")
  SS
    is the number of hours written in at least 2 digits (e.g., "03")
  mmm
    is the fractional part of seconds, written with 3-6 digits (any trailing zeros are dropped)

  Overrides:
    `toString` in class `Object`
  Returns:
    a string representation of the duration components

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.