Class CalendarCoordinate

java.lang.Object
org.episteme.social.history.calendars.CalendarCoordinate
All Implemented Interfaces:
Serializable, Comparable<TimeCoordinate>, Temporal<TimeCoordinate>, TimeCoordinate

public final class CalendarCoordinate extends Object implements TimeCoordinate, Serializable
A temporal coordinate based on an AlternateCalendar system. Allows for conversion between different calendar systems.
Since:
2.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

  • Method Details

    • getCalendar

      public AlternateCalendar getCalendar()
    • toInstant

      public Instant toInstant()
      Description copied from interface: TimeCoordinate
      Returns the exact instant this coordinate represents. If the coordinate is fuzzy or an interval, this returns a representative point.
      Specified by:
      toInstant in interface TimeCoordinate
      Returns:
      the instant
    • getPrecision

      public TimePrecision getPrecision()
      Description copied from interface: TimeCoordinate
      Returns the precision of this coordinate.
      Specified by:
      getPrecision in interface TimeCoordinate
      Returns:
      the precision level
    • isFuzzy

      public boolean isFuzzy()
      Description copied from interface: TimeCoordinate
      Returns whether this coordinate represents a range or has uncertainty.
      Specified by:
      isFuzzy in interface TimeCoordinate
      Returns:
      true if fuzzy or interval-based
    • toCalendar

      public <C extends AlternateCalendar> CalendarCoordinate toCalendar(Class<C> targetCalendar)
      Converts this coordinate to another calendar system.
      Type Parameters:
      C - the type of calendar
      Parameters:
      targetCalendar - the target calendar class
      Returns:
      the coordinate in the new system
    • compareTo

      public int compareTo(TimeCoordinate o)
      Specified by:
      compareTo in interface Comparable<TimeCoordinate>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object