Class ChronologyAlgebras

java.lang.Object
org.episteme.social.history.clock.ChronologyAlgebras

public final class ChronologyAlgebras extends Object
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 Details

    • allenRelation

      public static String allenRelation(TimeInterval a, TimeInterval b)
      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 interval
      b - second interval
      Returns:
      the Allen relation string
    • toMillis

      public static long toMillis(Object temporal)
      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 null
      IllegalArgumentException - if the type is not supported