au.gov.tas.dpiwe.mr.util
Class TimePart

java.lang.Object
  extended by java.util.Date
      extended by au.gov.tas.dpiwe.mr.util.TimePart
All Implemented Interfaces:
Serializable, Cloneable, Comparable

public class TimePart
extends Date

This is a Date where only the hour, minute and second (including fractions) of day are significant.

Since:
Mr Architecture 2.2
Version:
1.0.0.3
Author:
Kade Hansson
See Also:
Serialized Form

Field Summary
static int MILLISECONDS_IN_DAY
           
 
Constructor Summary
TimePart()
          Construct a new TimePart representing the current time of day.
TimePart(Date date)
          Construct a new TimePart representing the time-part of another date.
TimePart(long time)
          Construct a new TimePart representing the time of day on which a given epoch-based millisecond time occurs.
TimePart(Object date)
          Construct a new TimePart representing the time-part of another date or number in VCD format.
 
Method Summary
 int compareTo(Date other)
           
 boolean equals(Date other)
           
 int hashCode()
           
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MILLISECONDS_IN_DAY

public static final int MILLISECONDS_IN_DAY
See Also:
Constant Field Values
Constructor Detail

TimePart

public TimePart()
Construct a new TimePart representing the current time of day.


TimePart

public TimePart(long time)
Construct a new TimePart representing the time of day on which a given epoch-based millisecond time occurs.

Parameters:
time - milliseconds since epoch (midnight on 1 Jan 1970.)

TimePart

public TimePart(Date date)
Construct a new TimePart representing the time-part of another date.

Parameters:
date - date to split.

TimePart

public TimePart(Object date)
Construct a new TimePart representing the time-part of another date or number in VCD format.

Method Detail

equals

public boolean equals(Date other)

compareTo

public int compareTo(Date other)
Overrides:
compareTo in class Date

hashCode

public int hashCode()
Overrides:
hashCode in class Date