Enum Class HistoryBucket

java.lang.Object
java.lang.Enum<HistoryBucket>
io.jmix.aitoolsflowui.view.chathub.component.HistoryBucket
All Implemented Interfaces:
Serializable, Comparable<HistoryBucket>, Constable

@NullMarked public enum HistoryBucket extends Enum<HistoryBucket>
Date buckets used to group conversation history, ordered most-recent-first.
  • Enum Constant Details

  • Method Details

    • values

      public static HistoryBucket[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HistoryBucket valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static HistoryBucket of(@Nullable OffsetDateTime created, LocalDate today, ZoneId zone)
      Classifies the given creation date into a bucket relative to today. Boundaries: today (or future) → TODAY, the calendar day before → YESTERDAY, within the previous 7 days → LAST_WEEK, anything older (or missing) → EARLIER.
      Parameters:
      created - creation timestamp to classify, or null
      today - reference "today" date
      zone - time zone used to convert created to a local date
      Returns:
      the matching bucket (EARLIER if created is null)