com.sun.msv.datatype.xsd.datetime
Class BigDateTimeValueType

java.lang.Object
  extended bycom.sun.msv.datatype.xsd.datetime.BigDateTimeValueType
All Implemented Interfaces:
IDateTimeValueType, java.io.Serializable

public class BigDateTimeValueType
extends java.lang.Object
implements IDateTimeValueType

DateTimeValueType object that can hold all lexically valid dateTime value. This class provides:

  1. Unlimited digits for year (e.g., "year 9999999999999999999999")
  2. Unlimited digits for fraction of second (e.g. 0.00000000000001 sec)
To provide methods that can change date/time values, normalize method should be modified too.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Constructor Summary
BigDateTimeValueType()
           
BigDateTimeValueType(BigDateTimeValueType base, TimeZone newTimeZone)
          creates an instance with the specified BigDateTimeValueType, with modified time zone.
BigDateTimeValueType(java.math.BigInteger year, java.lang.Integer month, java.lang.Integer day, java.lang.Integer hour, java.lang.Integer minute, java.math.BigDecimal second, TimeZone timeZone)
           
BigDateTimeValueType(java.math.BigInteger year, int month, int day, int hour, int minute, java.math.BigDecimal second, TimeZone timeZone)
           
 
Method Summary
 IDateTimeValueType add(ITimeDurationValueType _rhs)
          returns the result of addition of this object and TimeDuration.
 int compare(IDateTimeValueType o)
          compare two DateTimeValueType as defined in com.sun.msv.datatype/Comparator
 boolean equals(BigDateTimeValueType lhs, BigDateTimeValueType rhs)
           
 boolean equals(IDateTimeValueType rhs)
           
 boolean equals(java.lang.Object o)
           
 BigDateTimeValueType getBigValue()
           
 java.lang.Integer getDay()
           
 java.lang.Integer getHour()
           
 java.lang.Integer getMinute()
           
 java.lang.Integer getMonth()
           
 java.math.BigDecimal getSecond()
           
 TimeZone getTimeZone()
           
 java.math.BigInteger getYear()
           
 int hashCode()
           
 IDateTimeValueType normalize()
          gets the normalized IDateTimeValueType.
 java.util.Calendar toCalendar()
          Approximates the value represented by this object into a Calendar object.
 java.lang.String toString()
          gets a human-readable representation of this object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigDateTimeValueType

public BigDateTimeValueType()

BigDateTimeValueType

public BigDateTimeValueType(BigDateTimeValueType base,
                            TimeZone newTimeZone)
creates an instance with the specified BigDateTimeValueType, with modified time zone. created object shares its date/time value component with the original one, so special care is necessary not to mutate those values.


BigDateTimeValueType

public BigDateTimeValueType(java.math.BigInteger year,
                            java.lang.Integer month,
                            java.lang.Integer day,
                            java.lang.Integer hour,
                            java.lang.Integer minute,
                            java.math.BigDecimal second,
                            TimeZone timeZone)

BigDateTimeValueType

public BigDateTimeValueType(java.math.BigInteger year,
                            int month,
                            int day,
                            int hour,
                            int minute,
                            java.math.BigDecimal second,
                            TimeZone timeZone)
Method Detail

add

public IDateTimeValueType add(ITimeDurationValueType _rhs)
Description copied from interface: IDateTimeValueType
returns the result of addition of this object and TimeDuration. this object will not be mutated.

Specified by:
add in interface IDateTimeValueType

compare

public int compare(IDateTimeValueType o)
Description copied from interface: IDateTimeValueType
compare two DateTimeValueType as defined in com.sun.msv.datatype/Comparator

Specified by:
compare in interface IDateTimeValueType

equals

public boolean equals(BigDateTimeValueType lhs,
                      BigDateTimeValueType rhs)

equals

public boolean equals(IDateTimeValueType rhs)

equals

public boolean equals(java.lang.Object o)

getBigValue

public BigDateTimeValueType getBigValue()
Specified by:
getBigValue in interface IDateTimeValueType

getDay

public java.lang.Integer getDay()

getHour

public java.lang.Integer getHour()

getMinute

public java.lang.Integer getMinute()

getMonth

public java.lang.Integer getMonth()

getSecond

public java.math.BigDecimal getSecond()

getTimeZone

public TimeZone getTimeZone()

getYear

public java.math.BigInteger getYear()

hashCode

public int hashCode()

normalize

public IDateTimeValueType normalize()
Description copied from interface: IDateTimeValueType
gets the normalized IDateTimeValueType. normalized value always has GMT timezone or no timezone

Specified by:
normalize in interface IDateTimeValueType

toCalendar

public java.util.Calendar toCalendar()
Description copied from interface: IDateTimeValueType
Approximates the value represented by this object into a Calendar object. This conversion may lose accuracy.

Specified by:
toCalendar in interface IDateTimeValueType

toString

public java.lang.String toString()
gets a human-readable representation of this object. return value is not intended to be compliant with the canonical representation of "dateTime" type.



Copyright © 2001-2003 Sun Microsystems, Inc. Documenation generated April 26 2005.