Package adams.core
Class Time
- java.lang.Object
-
- java.util.Date
-
- adams.core.Time
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Date>
public class Time extends Date
A thin wrapper to distinguish between date and time.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
toDate()
Returns the time object as date object.Time
toSql()
Returns the time object as SQL time object.-
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toInstant, toLocaleString, toString, UTC
-
-
-
-
Constructor Detail
-
Time
public Time()
Default constructor.
-
Time
public Time(long date)
Initializes the time with the given msecs.- Parameters:
date
- the msecs since 1970
-
Time
public Time(Date date)
Initializes the time with the given date.- Parameters:
date
- the Java date
-
-