Record Class RemoteCalendarsRead

java.lang.Object
java.lang.Record
org.exoplatform.caldav.model.RemoteCalendarsRead
Record Components:
calendars - the account's calendars, each with a usable colour; empty when the account could not be asked at all
failed - true when the account could not be listed, so the empty list above means "not read" rather than "no calendars"

public record RemoteCalendarsRead(List<RemoteCalendar> calendars, boolean failed) extends Record
What listing the connected account's calendars actually produced, failures included.

The same distinction RemoteEventsRead carries for events, at the one grain a listing has: either the account was asked and answered — with as many calendars as it holds, possibly none — or it could not be asked, and the empty list below says nothing about what the account holds.

  • Constructor Details

    • RemoteCalendarsRead

      public RemoteCalendarsRead(List<RemoteCalendar> calendars, boolean failed)
      Creates an instance of a RemoteCalendarsRead record class.
      Parameters:
      calendars - the value for the calendars record component
      failed - the value for the failed record component
  • Method Details

    • empty

      public static RemoteCalendarsRead empty()
      The answer of an account that has no calendar to offer and no failure to report — most often one that is simply not connected.
      Returns:
      an empty, unfailed listing
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • calendars

      public List<RemoteCalendar> calendars()
      Returns the value of the calendars record component.
      Returns:
      the value of the calendars record component
    • failed

      public boolean failed()
      Returns the value of the failed record component.
      Returns:
      the value of the failed record component