com.ice.cvsc
Class CVSTimestamp

java.lang.Object
  |
  +--java.util.Date
        |
        +--com.ice.cvsc.CVSTimestamp
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class CVSTimestamp
extends java.util.Date
implements java.lang.Cloneable

The CVSTimestamp class is a subclass of Date, specifically designed to be used as the time stamp of CVS entries. This class allows us to display the timestamps of CVS Entries, as well as determine when files have been updated.

Version:
$Revision: 2.6 $
Author:
Timothy Gerard Endres, time@ice.com.
See Also:
CVSTimestampFormat, Serialized Form

Field Summary
static java.lang.String RCS_ID
           
static java.lang.String RCS_REV
           
 
Constructor Summary
CVSTimestamp()
           
CVSTimestamp(java.util.Date date)
           
CVSTimestamp(long msSinceEpoch)
           
 
Method Summary
 boolean equalsTime(long time)
          Determines if this timestamp is considered equivalent to the time represented by the parameter we are passed.
 boolean equalsTimestamp(CVSTimestamp stamp)
          Determines if this timestamp is considered equivalent to the time represented by another timestamp.
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, 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

RCS_ID

public static final java.lang.String RCS_ID
See Also:
Constant Field Values

RCS_REV

public static final java.lang.String RCS_REV
See Also:
Constant Field Values
Constructor Detail

CVSTimestamp

public CVSTimestamp()

CVSTimestamp

public CVSTimestamp(long msSinceEpoch)

CVSTimestamp

public CVSTimestamp(java.util.Date date)
Method Detail

equalsTime

public boolean equalsTime(long time)
Determines if this timestamp is considered equivalent to the time represented by the parameter we are passed. Note that we allow up to, but not including, one second of time difference, since Java allows millisecond time resolution while CVS stores second resolution timestamps. Further, we allow the resolution difference on either side of the second because we can not be sure of the rounding.


equalsTimestamp

public boolean equalsTimestamp(CVSTimestamp stamp)
Determines if this timestamp is considered equivalent to the time represented by another timestamp. Note that we allow up to, but not including, one second of time difference, since Java allows millisecond time resolution while CVS stores second resolution timestamps. Further, we allow the resolution difference on either side of the second because we can not be sure of the rounding.



Copyright © 1997-2003, Timothy G. Endres, All Rights Reserved.