edu.iris.Fissures.model
Class MicroSecondDate
java.lang.Object
java.util.Date
edu.iris.Fissures.model.MicroSecondDate
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>
public class MicroSecondDate
- extends java.util.Date
- implements java.io.Serializable
subclass of the java.util.Date class to extend the precision to microseconds
and to eventually handle leap seconds.
- See Also:
- Serialized Form
Methods inherited from class java.util.Date |
clone, compareTo, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
microseconds
protected long microseconds
leapSecondVersion
protected int leapSecondVersion
leapHistory
protected LeapSecondHistory leapHistory
MicroSecondDate
public MicroSecondDate()
MicroSecondDate
public MicroSecondDate(long microseconds)
MicroSecondDate
public MicroSecondDate(long microseconds,
int leapSeconds)
MicroSecondDate
public MicroSecondDate(java.util.Date d)
MicroSecondDate
public MicroSecondDate(MicroSecondDate d)
MicroSecondDate
public MicroSecondDate(java.sql.Timestamp ts,
int leapSeconds)
MicroSecondDate
public MicroSecondDate(java.sql.Timestamp ts)
MicroSecondDate
public MicroSecondDate(edu.iris.Fissures.Time t)
MicroSecondDate
public MicroSecondDate(java.lang.String isoTimeString)
getMicroSecondTime
public long getMicroSecondTime()
getMicroSeconds
public long getMicroSeconds()
- Returns the microseconds as a number between 0 and 999, the milliseconds
are kept in the Date superclass.
- Returns:
- the microseconds as a number between 0 and 999.
getTimestamp
public java.sql.Timestamp getTimestamp()
getFissuresTime
public edu.iris.Fissures.Time getFissuresTime()
getLeapSecondVersion
public int getLeapSecondVersion()
add
public MicroSecondDate add(TimeInterval interval)
subtract
public MicroSecondDate subtract(TimeInterval interval)
subtract
public TimeInterval subtract(MicroSecondDate otherDate)
- Returns the timewidth of this - otherDate.
difference
public TimeInterval difference(MicroSecondDate otherDate)
- Returns the TimeInterval between the two times. It is always positive
regardless of which time comes before the other.
equals
public boolean equals(java.lang.Object otherDate)
- Overrides:
equals
in class java.util.Date
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.util.Date
after
public boolean after(java.util.Date otherDate)
- Overrides:
after
in class java.util.Date
before
public boolean before(java.util.Date otherDate)
- Overrides:
before
in class java.util.Date
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.Date