Package org.gedcomx.date
Class GedcomxDate
java.lang.Object
org.gedcomx.date.GedcomxDate
- All Implemented Interfaces:
Comparable<GedcomxDate>
- Direct Known Subclasses:
GedcomxDateApproximate,GedcomxDateDuration,GedcomxDateRange,GedcomxDateRecurring,GedcomxDateSimple
A Formal Gedcomx Date
- Author:
- John Clark.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis method MAY not be implemented for each subclass.abstract GedcomxDateTypegetType()Return the type of dateabstract booleanWhether or not this date is approximateabstract StringThe formal representation of this date
-
Constructor Details
-
GedcomxDate
public GedcomxDate()
-
-
Method Details
-
getType
Return the type of date- Returns:
- The Type
-
isApproximate
public abstract boolean isApproximate()Whether or not this date is approximate- Returns:
- True if this date is approximate
-
toFormalString
The formal representation of this date- Returns:
- The formal string
-
compareTo
This method MAY not be implemented for each subclass. Specific behavior should be documented in each subclass implementation.- Specified by:
compareToin interfaceComparable<GedcomxDate>- Parameters:
o- the object to be compared.- Returns:
- If implemented - a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
- Throws:
UnsupportedOperationException- if the sublcass does not support this method.
-