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

java.lang.Object
  extended by com.sun.msv.datatype.xsd.datetime.BigTimeDurationValueType
All Implemented Interfaces:
ITimeDurationValueType, Serializable

public class BigTimeDurationValueType
extends Object
implements ITimeDurationValueType

ITimeDurationValueType implementation that can hold all lexically legal timeDuration value.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Constructor Summary
BigTimeDurationValueType(int signum, BigInteger year, BigInteger month, BigInteger day, BigInteger hour, BigInteger minute, BigDecimal second)
          All the fields should be positive and use the signum field to determine the sign.
BigTimeDurationValueType(String lexicalRepresentation)
          Reads in the lexical duration format.
 
Method Summary
 int compare(ITimeDurationValueType o)
          compare two ITimeDurationValueType as defined in com.sun.msv.datatype/Comparator
 boolean equals(ITimeDurationValueType o)
           
 boolean equals(Object o)
           
static BigTimeDurationValueType fromMinutes(BigInteger minutes)
           
static BigTimeDurationValueType fromMinutes(int minutes)
           
 BigTimeDurationValueType getBigValue()
           
 BigInteger getDay()
           
 BigInteger getHour()
           
 BigInteger getMinute()
           
 BigInteger getMonth()
           
 BigDecimal getSecond()
           
 BigInteger getYear()
           
 int hashCode()
          hash code has to be consistent with equals method.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigTimeDurationValueType

public BigTimeDurationValueType(int signum,
                                BigInteger year,
                                BigInteger month,
                                BigInteger day,
                                BigInteger hour,
                                BigInteger minute,
                                BigDecimal second)
All the fields should be positive and use the signum field to determine the sign.


BigTimeDurationValueType

public BigTimeDurationValueType(String lexicalRepresentation)
                         throws IllegalArgumentException
Reads in the lexical duration format.

Parameters:
lexicalRepresentation - whitespace stripped lexical form.
Throws:
IllegalArgumentException
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

equals

public boolean equals(ITimeDurationValueType o)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
hash code has to be consistent with equals method.

Overrides:
hashCode in class Object

compare

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

Specified by:
compare in interface ITimeDurationValueType

getBigValue

public BigTimeDurationValueType getBigValue()
Specified by:
getBigValue in interface ITimeDurationValueType

fromMinutes

public static BigTimeDurationValueType fromMinutes(int minutes)

fromMinutes

public static BigTimeDurationValueType fromMinutes(BigInteger minutes)

getDay

public BigInteger getDay()
Returns:
non-null positive value. use signum for the sign.

getHour

public BigInteger getHour()
Returns:
non-null positive value. use signum for the sign.

getMinute

public BigInteger getMinute()
Returns:
non-null positive value. use signum for the sign.

getMonth

public BigInteger getMonth()
Returns:
non-null positive value. use signum for the sign.

getSecond

public BigDecimal getSecond()
Returns:
non-null positive value. use signum for the sign.

getYear

public BigInteger getYear()
Returns:
non-null positive value. use signum for the sign.