|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gedcomx.util.date.Duration
public class Duration
Class representing a Duration in a GedcomX formal date. The form of a Duration string is P[yyyyY][mmM][ddD][T[hhH][mmM][ssS]] for a duration in years, months, days, hours, minutes and/or seconds. User: Randy Wilson Date: 8/8/13 Time: 6:37 PM
| Constructor Summary | |
|---|---|
Duration(Integer year,
Integer month,
Integer day,
Integer hour,
Integer minute,
Integer second)
Deprecated. Constructor that fully specifies all of the fields. |
|
Duration(String durationString)
Deprecated. Constructor that takes a valid duration string and parses it into a Duration object. |
|
| Method Summary | |
|---|---|
Integer |
getDay()
Deprecated. Get the duration day, or null if not specified. |
Integer |
getHour()
Deprecated. Get the duration hour, or null if not specified. |
Integer |
getMinute()
Deprecated. Get the duration minute, or null if not specified. |
Integer |
getMonth()
Deprecated. Get the duration month, or null if not specified. |
Integer |
getSecond()
Deprecated. Get the duration second, or null if not specified. |
Integer |
getYear()
Deprecated. Get the duration year, or null if not specified. |
boolean |
isValid()
Deprecated. Tell whether the Duration is valid, which means that at least one of its values is non-null, and none exceeds the 2-digit limit (or 4 digits for year). |
void |
setDay(Integer day)
Deprecated. Set the duration day. |
void |
setHour(Integer hour)
Deprecated. Set the duration hour. |
void |
setMinute(Integer minute)
Deprecated. Set the duration minute. |
void |
setMonth(Integer month)
Deprecated. Set the duration month. |
void |
setSecond(Integer second)
Deprecated. Set the duration second. |
void |
setYear(Integer year)
Deprecated. Set the duration year. |
String |
toString()
Deprecated. Convert this Duration to the canonical string for a Duration, of the form: P[yyyyY][mmM][ddD][T[hhH][mmM][ssS]] for use in a GedcomX formal date string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Duration(Integer year,
Integer month,
Integer day,
Integer hour,
Integer minute,
Integer second)
year - - Duration in years, or null if not set.month - - Duration in months, or null if not set.day - - Duration in days, or null if not set.hour - - Duration in hours, or null if not set.minute - - Duration in minutes, or null if not set.second - - Duration in seconds, or null if not set.public Duration(String durationString)
durationString - - String of the form "P[yyyyY][mmM][ddD][T[hhH][mmM][ssS]]" that specifies a duration.| Method Detail |
|---|
public Integer getYear()
public void setYear(Integer year)
year - - duration year, or null if not specified.public Integer getMonth()
public void setMonth(Integer month)
month - - duration month, or null if not specified.public Integer getDay()
public void setDay(Integer day)
day - - duration day, or null if not specified.public Integer getHour()
public void setHour(Integer hour)
hour - - duration hour, or null if not specified.public Integer getMinute()
public void setMinute(Integer minute)
minute - - duration minute, or null if not specified.public Integer getSecond()
public void setSecond(Integer second)
second - - duration second, or null if not specified.public String toString()
toString in class Objectpublic boolean isValid()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||