Record Class MenuBarReading

java.lang.Object
java.lang.Record
limn.backend.spi.MenuBarReading
Record Components:
about - the item that says what the application is, for the application's own menu, or null; only its number, its enabled state and whether it is there are used, the system having its own label for it
settings - the item that opens the application's settings, likewise
menus - the bar's menus in the application's order, the items above taken out and the item that ends the application dropped, the system having its own
rightToLeft - whether the application reads from the right

public record MenuBarReading(@Nullable MenuRow about, @Nullable MenuRow settings, List<MenuBarReading.Top> menus, boolean rightToLeft) extends Record
A menu bar as a backend is handed it for the system's own bar: what the application declared, already sorted into the places a system that keeps the bar outside the window has for it.

One reading numbers the rows of the whole bar, the two of the application's menu included, and a number means nothing once the bar has been read again.

  • Field Details

    • EMPTY

      public static final MenuBarReading EMPTY
      A bar with nothing in it.
  • Constructor Details

    • MenuBarReading

      public MenuBarReading(@Nullable MenuRow about, @Nullable MenuRow settings, List<MenuBarReading.Top> menus, boolean rightToLeft)
      Creates an instance of a MenuBarReading record class.
      Parameters:
      about - the value for the about record component
      settings - the value for the settings record component
      menus - the value for the menus record component
      rightToLeft - the value for the rightToLeft 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. 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.
    • about

      public @Nullable MenuRow about()
      Returns the value of the about record component.
      Returns:
      the value of the about record component
    • settings

      public @Nullable MenuRow settings()
      Returns the value of the settings record component.
      Returns:
      the value of the settings record component
    • rightToLeft

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