public class BigTimeDurationValueType extends Object implements ITimeDurationValueType
Modifier and Type | Field and Description |
---|---|
protected BigInteger |
day |
protected BigInteger |
hour |
protected BigInteger |
minute |
protected BigInteger |
month |
protected BigDecimal |
second |
protected int |
signum |
protected BigInteger |
year |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
protected int signum
protected BigInteger year
protected BigInteger month
protected BigInteger day
protected BigInteger hour
protected BigInteger minute
protected BigDecimal second
public BigTimeDurationValueType(int signum, BigInteger year, BigInteger month, BigInteger day, BigInteger hour, BigInteger minute, BigDecimal second)
public BigTimeDurationValueType(String lexicalRepresentation) throws IllegalArgumentException
lexicalRepresentation
- whitespace stripped lexical form.IllegalArgumentException
public boolean equals(ITimeDurationValueType o)
public int hashCode()
public int compare(ITimeDurationValueType o)
ITimeDurationValueType
compare
in interface ITimeDurationValueType
public BigTimeDurationValueType getBigValue()
getBigValue
in interface ITimeDurationValueType
public static BigTimeDurationValueType fromMinutes(int minutes)
public static BigTimeDurationValueType fromMinutes(BigInteger minutes)
public BigInteger getDay()
signum
for the sign.public BigInteger getHour()
signum
for the sign.public BigInteger getMinute()
signum
for the sign.public BigInteger getMonth()
signum
for the sign.public BigDecimal getSecond()
signum
for the sign.public BigInteger getYear()
signum
for the sign.Copyright © 2016 Oracle Corporation. All rights reserved.