|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthredds.datatype.TimeDuration
public class TimeDuration
Implements the thredds "duration" XML element type: specifies a length of time. This is really the same as a ucar.nc2.units.TimeUnit, but it allows xsd:duration syntax as well as udunits syntax. It also keeps track if the text is empty. A duration can be one of the following:
| Constructor Summary | |
|---|---|
TimeDuration(java.lang.String text)
|
|
TimeDuration(TimeDuration src)
copy constructor |
|
TimeDuration(TimeUnit timeUnit)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getText()
|
TimeUnit |
getTimeUnit()
|
double |
getValue()
get the duration in natural units |
double |
getValue(TimeUnit want)
get the duration in want units |
double |
getValueInSeconds()
get the duration in seconds |
int |
hashCode()
|
boolean |
isBlank()
|
static void |
main(java.lang.String[] args)
debug |
void |
setValueInSeconds(double secs)
set the duration in seconds |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimeDuration(TimeDuration src)
public TimeDuration(TimeUnit timeUnit)
public TimeDuration(java.lang.String text)
throws java.text.ParseException
java.text.ParseException| Method Detail |
|---|
public double getValue()
public double getValue(TimeUnit want)
throws ucar.units.ConversionException
ucar.units.ConversionExceptionpublic double getValueInSeconds()
public void setValueInSeconds(double secs)
public boolean isBlank()
public TimeUnit getTimeUnit()
public java.lang.String getText()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||