org.jscience.history.time
Class DecimalTime

java.lang.Object
  extended by org.jscience.history.time.Time
      extended by org.jscience.history.time.DecimalTime

public class DecimalTime
extends Time

A class representing a way to compute time.


Field Summary
static Unit<Duration> DAYS_HOURS_MINUTES_SECONDS_MILLIS
          DOCUMENT ME!
static Unit<Duration> DECIMAL_DAY
          A unit of duration equal to 10 DECIMAL_HOUR (standard name d).
static Unit<Duration> DECIMAL_HOUR
          A unit of duration equal to 100 DECIMAL_MINUTE (standard name h).
static Unit<Duration> DECIMAL_MILLISECOND
          A unit of duration equal to 1/1000 s (standard name ms).
static Unit<Duration> DECIMAL_MINUTE
          A unit of duration equal to 100 s (standard name min).
static BaseUnit<Duration> DECIMAL_SECOND
          The base unit for decimal seconds, which is 0.864 SI seconds.
static int HOURS_PER_DAY
          DOCUMENT ME!
static int MILLISECONDS_PER_SECOND
          DOCUMENT ME!
static int MINUTES_PER_HOUR
          DOCUMENT ME!
static int SECONDS_PER_MINUTE
          DOCUMENT ME!
 
Constructor Summary
DecimalTime()
          Creates a new DecimalTime object.
DecimalTime(double millis)
          Creates a new DecimalTime object.
DecimalTime(double days, double hours, double minutes, double seconds, double millis)
          Creates a new DecimalTime object.
 
Method Summary
 int getDays()
          DOCUMENT ME!
 int getHours()
          DOCUMENT ME!
 int getMilliseconds()
          DOCUMENT ME!
 int getMinutes()
          DOCUMENT ME!
 int getSeconds()
          DOCUMENT ME!
 Amount<Duration> getTime()
          DOCUMENT ME!
 void nextDay()
          DOCUMENT ME!
 void nextHour()
          DOCUMENT ME!
 void nextMillisecond()
          DOCUMENT ME!
 void nextMinute()
          DOCUMENT ME!
 void nextSecond()
          DOCUMENT ME!
 java.util.Calendar toCalendar()
          DOCUMENT ME!
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HOURS_PER_DAY

public static final int HOURS_PER_DAY
DOCUMENT ME!

See Also:
Constant Field Values

MINUTES_PER_HOUR

public static final int MINUTES_PER_HOUR
DOCUMENT ME!

See Also:
Constant Field Values

SECONDS_PER_MINUTE

public static final int SECONDS_PER_MINUTE
DOCUMENT ME!

See Also:
Constant Field Values

MILLISECONDS_PER_SECOND

public static final int MILLISECONDS_PER_SECOND
DOCUMENT ME!

See Also:
Constant Field Values

DECIMAL_SECOND

public static final BaseUnit<Duration> DECIMAL_SECOND
The base unit for decimal seconds, which is 0.864 SI seconds.


DECIMAL_MILLISECOND

public static final Unit<Duration> DECIMAL_MILLISECOND
A unit of duration equal to 1/1000 s (standard name ms).


DECIMAL_MINUTE

public static final Unit<Duration> DECIMAL_MINUTE
A unit of duration equal to 100 s (standard name min).


DECIMAL_HOUR

public static final Unit<Duration> DECIMAL_HOUR
A unit of duration equal to 100 DECIMAL_MINUTE (standard name h).


DECIMAL_DAY

public static final Unit<Duration> DECIMAL_DAY
A unit of duration equal to 10 DECIMAL_HOUR (standard name d).


DAYS_HOURS_MINUTES_SECONDS_MILLIS

public static final Unit<Duration> DAYS_HOURS_MINUTES_SECONDS_MILLIS
DOCUMENT ME!

Constructor Detail

DecimalTime

public DecimalTime(double days,
                   double hours,
                   double minutes,
                   double seconds,
                   double millis)
Creates a new DecimalTime object.


DecimalTime

public DecimalTime(double millis)
Creates a new DecimalTime object.

Parameters:
millis - DOCUMENT ME!

DecimalTime

public DecimalTime()
Creates a new DecimalTime object.

Method Detail

getTime

public Amount<Duration> getTime()
DOCUMENT ME!

Specified by:
getTime in class Time
Returns:
DOCUMENT ME!

getMilliseconds

public int getMilliseconds()
DOCUMENT ME!

Specified by:
getMilliseconds in class Time
Returns:
DOCUMENT ME!

getSeconds

public int getSeconds()
DOCUMENT ME!

Specified by:
getSeconds in class Time
Returns:
DOCUMENT ME!

getMinutes

public int getMinutes()
DOCUMENT ME!

Specified by:
getMinutes in class Time
Returns:
DOCUMENT ME!

getHours

public int getHours()
DOCUMENT ME!

Specified by:
getHours in class Time
Returns:
DOCUMENT ME!

getDays

public int getDays()
DOCUMENT ME!

Specified by:
getDays in class Time
Returns:
DOCUMENT ME!

nextMillisecond

public void nextMillisecond()
DOCUMENT ME!

Specified by:
nextMillisecond in class Time

nextSecond

public void nextSecond()
DOCUMENT ME!

Specified by:
nextSecond in class Time

nextMinute

public void nextMinute()
DOCUMENT ME!

Specified by:
nextMinute in class Time

nextHour

public void nextHour()
DOCUMENT ME!

Specified by:
nextHour in class Time

nextDay

public void nextDay()
DOCUMENT ME!

Specified by:
nextDay in class Time

toCalendar

public java.util.Calendar toCalendar()
DOCUMENT ME!

Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Specified by:
toString in class Time
Returns:
DOCUMENT ME!