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
public abstract class GedcomxDate extends Object implements Comparable<GedcomxDate>
A Formal Gedcomx Date- Author:
- John Clark.
-
-
Constructor Summary
Constructors Constructor Description GedcomxDate()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(GedcomxDate o)This method MAY not be implemented for each subclass.abstract GedcomxDateTypegetType()Return the type of dateabstract booleanisApproximate()Whether or not this date is approximateabstract StringtoFormalString()The formal representation of this date
-
-
-
Method Detail
-
getType
public abstract GedcomxDateType 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
public abstract String toFormalString()
The formal representation of this date- Returns:
- The formal string
-
compareTo
public int compareTo(GedcomxDate o)
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.
-
-