Class BigDateTimeValueType
java.lang.Object
com.sun.msv.datatype.xsd.datetime.BigDateTimeValueType
- All Implemented Interfaces:
IDateTimeValueType, Serializable
DateTimeValueType object that can hold all lexically valid dateTime value.
This class provides:
- Unlimited digits for year (e.g., "year 9999999999999999999999")
- Unlimited digits for fraction of second (e.g. 0.00000000000001 sec)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Integerday (always normalized, between 0-30) this variable is null if no year is specifiedprivate Integerhour (always between 0 and 23) this variable is null if no year is specifiedprivate Integerminute (always between 0 and 59) this variable is null if no year is specifiedprivate Integermonth (always between 0 and 11) this variable is null if no year is specifiedprivate IDateTimeValueTypenormalized DateTimeValue of this object.private BigDecimalsecond (always in [0,60) ) this variable is null if no year is specifiedprivate static final longprivate BigIntegeryear value.private TimeZonetime zone specifier. -
Constructor Summary
ConstructorsConstructorDescriptionBigDateTimeValueType(BigDateTimeValueType base, TimeZone newTimeZone) creates an instance with the specified BigDateTimeValueType, with modified time zone.BigDateTimeValueType(BigInteger year, int month, int day, int hour, int minute, BigDecimal second, TimeZone timeZone) BigDateTimeValueType(BigInteger year, Integer month, Integer day, Integer hour, Integer minute, BigDecimal second, TimeZone timeZone) -
Method Summary
Modifier and TypeMethodDescriptionadd(ITimeDurationValueType _rhs) returns the result of addition of this object and TimeDuration.protected static intcompare(BigDateTimeValueType lhs, BigDateTimeValueType rhs) compares two BigDateTimeValueType and returns one of the constant defined inComparator.intcompare two DateTimeValueType as defined in com.sun.msv.datatype/Comparatorprotected TimeZoneDeprecated.private static BigInteger[]divideAndRemainder(BigInteger x1, BigInteger x2) booleanequals(BigDateTimeValueType lhs, BigDateTimeValueType rhs) booleanequals(IDateTimeValueType rhs) booleangetDay()getHour()getMonth()getYear()inthashCode()gets the normalized IDateTimeValueType.private static BigDecimalprivate static BigIntegerprivate BigDecimalsigned(BigTimeDurationValueType dur, BigDecimal i) private BigIntegersigned(BigTimeDurationValueType dur, BigInteger i) Approximates the value represented by this object into a Calendar object.toString()gets a human-readable representation of this object.
-
Field Details
-
year
year value. this variable is null if no year is specified. Since there is no year 0, value 0 indicates year -1. -1 indicates -2, and so forth. -
month
month (always between 0 and 11) this variable is null if no year is specified -
day
day (always normalized, between 0-30) this variable is null if no year is specified -
hour
hour (always between 0 and 23) this variable is null if no year is specified -
minute
minute (always between 0 and 59) this variable is null if no year is specified -
second
second (always in [0,60) ) this variable is null if no year is specified -
zone
time zone specifier. null if missing -
normalizedValue
normalized DateTimeValue of this object. once when the normalized value is computed, the value is kept in this varible so that successive calls to normalize method need not have to compute it again. This approach assumes that modification to the date/time component will never be made. -
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
BigDateTimeValueType
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(BigInteger year, int month, int day, int hour, int minute, BigDecimal second, TimeZone timeZone) -
BigDateTimeValueType
public BigDateTimeValueType(BigInteger year, Integer month, Integer day, Integer hour, Integer minute, BigDecimal second, TimeZone timeZone) -
BigDateTimeValueType
public BigDateTimeValueType()
-
-
Method Details
-
getYear
-
getMonth
-
getDay
-
getHour
-
getMinute
-
getSecond
-
getTimeZone
-
getBigValue
- Specified by:
getBigValuein interfaceIDateTimeValueType
-
equals
-
equals
-
equals
-
toString
-
hashCode
-
compare
Description copied from interface:IDateTimeValueTypecompare two DateTimeValueType as defined in com.sun.msv.datatype/Comparator- Specified by:
comparein interfaceIDateTimeValueType
-
compare
compares two BigDateTimeValueType and returns one of the constant defined inComparator. Order-relation between two dateTime is defined in http://www.w3.org/TR/xmlschema-2/#dateTime -
normalize
Description copied from interface:IDateTimeValueTypegets the normalized IDateTimeValueType. normalized value always has GMT timezone or no timezone- Specified by:
normalizein interfaceIDateTimeValueType
-
nullAs0
-
nullAs0
-
divideAndRemainder
-
add
Description copied from interface:IDateTimeValueTypereturns the result of addition of this object and TimeDuration. this object will not be mutated.- Specified by:
addin interfaceIDateTimeValueType
-
signed
-
signed
-
toCalendar
Description copied from interface:IDateTimeValueTypeApproximates the value represented by this object into a Calendar object. This conversion may lose accuracy.- Specified by:
toCalendarin interfaceIDateTimeValueType
-
createJavaTimeZone
Deprecated.usegetTimeZone().Creates the equivalent Java TimeZone object.- Returns:
- a non-null valid object.
-
getTimeZone().