Class ChronologyAlgebras
java.lang.Object
org.episteme.social.history.clock.ChronologyAlgebras
Defines various algebras over temporal structures.
Allen's Interval Algebra and other qualitative time logic systems.
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringDetermines the Allen relation between two intervals.static longConverts various temporal objects to epoch milliseconds.
-
Method Details
-
allenRelation
Determines the Allen relation between two intervals. Possible relations: equal, before, after, meets, met-by, overlaps, overlapped-by, starts, started-by, finishes, finished-by, during, contains.- Parameters:
a- first intervalb- second interval- Returns:
- the Allen relation string
-
toMillis
Converts various temporal objects to epoch milliseconds.- Parameters:
temporal- the temporal object (LocalDate, Instant, Date, etc.)- Returns:
- milliseconds since Unix Epoch
- Throws:
NullPointerException- if temporal is nullIllegalArgumentException- if the type is not supported
-