com.ibm.itim.common
Class AttributeDateValue

java.lang.Object
  |
  +--java.util.Date
        |
        +--com.ibm.itim.common.AttributeDateValue
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class AttributeDateValue
extends java.util.Date

Class for handling time in Generalized Time Format as specified by X.208. This time is of the format YYYYMMDDHHMMSSZ where Z is the time zone (using GMT is recomended by RFC 2252).

See Also:
Serialized Form

Constructor Summary
AttributeDateValue(java.util.Date date)
          Construct a AttributeDateValue with a Date.
AttributeDateValue(int year, int month, int day, int hour, int minute, int second)
          Construct a GeneralizedTime from a set of time args.
AttributeDateValue(long systemTime)
          Construct a AttributeDateValue with a Date.
AttributeDateValue(java.lang.String generalizedTimeString)
          Construct a AttributeDateValue from a string.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Overrides the method from java.lang.Object.
 java.lang.String getDD()
           
 java.lang.String gethh()
           
 java.lang.String getmm()
           
 java.lang.String getMM()
           
 java.lang.String getYY()
           
 java.lang.String getYYYY()
           
 int hashCode()
          Overrides the method from java.lang.Object.
 java.lang.String toString()
          Overrides the method from java.lang.Object.
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, 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
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeDateValue

public AttributeDateValue(java.util.Date date)
Construct a AttributeDateValue with a Date.
Parameters:
date - Initial date for the AttributeDateValue.

AttributeDateValue

public AttributeDateValue(long systemTime)
Construct a AttributeDateValue with a Date.
Parameters:
systemTime - Initial date for the AttributeDateValue as system time in milliseconds.

AttributeDateValue

public AttributeDateValue(java.lang.String generalizedTimeString)
Construct a AttributeDateValue from a string.
Parameters:
generalizedTimeString - Initial generalized time string. Should be in YYYYMMDDHHMMSSZ format.

AttributeDateValue

public AttributeDateValue(int year,
                          int month,
                          int day,
                          int hour,
                          int minute,
                          int second)
Construct a GeneralizedTime from a set of time args.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides the method from java.lang.Object.
Overrides:
equals in class java.util.Date
Parameters:
obj - another GeneralizedTime object.
Returns:
true if the argument is also a GeneralizedTime object and has the same string representation

hashCode

public int hashCode()
Overrides the method from java.lang.Object.
Overrides:
hashCode in class java.util.Date
Returns:
the same hash code as the string representation of this class.

toString

public java.lang.String toString()
Overrides the method from java.lang.Object.
Overrides:
toString in class java.util.Date
Returns:
A string in the form YYYYmmddhhmmZ

getMM

public java.lang.String getMM()

getDD

public java.lang.String getDD()

getYY

public java.lang.String getYY()

getYYYY

public java.lang.String getYYYY()

gethh

public java.lang.String gethh()

getmm

public java.lang.String getmm()