Class CalendarCoordinate
java.lang.Object
org.episteme.social.history.calendars.CalendarCoordinate
- All Implemented Interfaces:
Serializable, Comparable<TimeCoordinate>, Temporal<TimeCoordinate>, TimeCoordinate
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 Summary
ConstructorsConstructorDescriptionCalendarCoordinate(AlternateCalendar calendar) CalendarCoordinate(AlternateCalendar calendar, TimePrecision precision) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanReturns the precision of this coordinate.inthashCode()booleanisFuzzy()Returns whether this coordinate represents a range or has uncertainty.<C extends AlternateCalendar>
CalendarCoordinatetoCalendar(Class<C> targetCalendar) Converts this coordinate to another calendar system.Returns the exact instant this coordinate represents.toString()Methods inherited from interface TimeCoordinate
getWhen
-
Constructor Details
-
CalendarCoordinate
-
CalendarCoordinate
-
-
Method Details
-
getCalendar
-
toInstant
Description copied from interface:TimeCoordinateReturns the exact instant this coordinate represents. If the coordinate is fuzzy or an interval, this returns a representative point.- Specified by:
toInstantin interfaceTimeCoordinate- Returns:
- the instant
-
getPrecision
Description copied from interface:TimeCoordinateReturns the precision of this coordinate.- Specified by:
getPrecisionin interfaceTimeCoordinate- Returns:
- the precision level
-
isFuzzy
public boolean isFuzzy()Description copied from interface:TimeCoordinateReturns whether this coordinate represents a range or has uncertainty.- Specified by:
isFuzzyin interfaceTimeCoordinate- Returns:
- true if fuzzy or interval-based
-
toCalendar
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
- Specified by:
compareToin interfaceComparable<TimeCoordinate>
-
toString
-
equals
-
hashCode
-