Package docking.widgets.searchlist

# Record Class SearchListEntry<T>

java.lang.Object
java.lang.Record
docking.widgets.searchlist.SearchListEntry<T>

Type Parameters:
  `T` - the type of list items
Record Components:
  `value` - the list item (T)
  `category` - the category for the item
  `showCategory` - true if this is the first item in the category and therefor the category should be displayed.
  `drawSeparator` - if true, then a separator line should be drawn after this entry. This should only be the case for the last entry in a category (and not the last category.)

public record SearchListEntry<T>(T value, String category, boolean showCategory, boolean drawSeparator) extends Record
An record to hold the list item and additional information needed to properly render the item.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SearchListEntry(T value, String category, boolean showCategory, boolean drawSeparator)`
  Creates an instance of a `SearchListEntry` record class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `category()`
  Returns the value of the `category` record component.
  `boolean`
  `drawSeparator()`
  Returns the value of the `drawSeparator` record component.
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `boolean`
  `showCategory()`
  Returns the value of the `showCategory` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `T`
  `value()`
  Returns the value of the `value` record component.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### SearchListEntry

    public SearchListEntry(T value, String category, boolean showCategory, boolean drawSeparator)
    Creates an instance of a `SearchListEntry` record class.
    Parameters:
      `value` - the value for the `value` record component
      `category` - the value for the `category` record component
      `showCategory` - the value for the `showCategory` record component
      `drawSeparator` - the value for the `drawSeparator` 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.

  - ### value

    public T value()
    Returns the value of the `value` record component.
    Returns:
      the value of the `value` record component

  - ### category

    public String category()
    Returns the value of the `category` record component.
    Returns:
      the value of the `category` record component

  - ### showCategory

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

  - ### drawSeparator

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