Record Class TimeIntervalContainer

java.lang.Object
java.lang.Record
org.localify.dashboard.dto.TimeIntervalContainer
Record Components:
allTime - A list of instants representing all time.
month - A list of instants representing the last month.
week - A list of instants representing the last week.
day - A list of instants representing the last day.
hour - A list of instants representing the last hour.

public record TimeIntervalContainer(List<Instant> allTime, List<Instant> month, List<Instant> week, List<Instant> day, List<Instant> hour) extends Record
A container for time intervals.
  • Constructor Details

    • TimeIntervalContainer

      public TimeIntervalContainer(List<Instant> allTime, List<Instant> month, List<Instant> week, List<Instant> day, List<Instant> hour)
      Creates an instance of a TimeIntervalContainer record class.
      Parameters:
      allTime - the value for the allTime record component
      month - the value for the month record component
      week - the value for the week record component
      day - the value for the day record component
      hour - the value for the hour record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • allTime

      public List<Instant> allTime()
      Returns the value of the allTime record component.
      Returns:
      the value of the allTime record component
    • month

      public List<Instant> month()
      Returns the value of the month record component.
      Returns:
      the value of the month record component
    • week

      public List<Instant> week()
      Returns the value of the week record component.
      Returns:
      the value of the week record component
    • day

      public List<Instant> day()
      Returns the value of the day record component.
      Returns:
      the value of the day record component
    • hour

      public List<Instant> hour()
      Returns the value of the hour record component.
      Returns:
      the value of the hour record component