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 Details

    • GedcomxDate

      public GedcomxDate()
  • Method Details

    • 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:
      compareTo in interface Comparable<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.