Class SelectList.Row

java.lang.Object
dev.xichil.mvui.SelectList.Row
Enclosing class:
SelectList

public static final class SelectList.Row extends Object
One row of a SelectList: an id the mod knows it by, and the text shown. Immutable.
  • Method Details

    • of

      public static SelectList.Row of(String id, Text text)
      A row.
      Parameters:
      id - identifies the row within its list (any string, e.g. a profile name or database key); what SelectList.selected() and onSelect report
      text - what the row shows
      Returns:
      the row
      Throws:
      NullPointerException - if an argument is null
    • id

      public String id()
      The row's id within its list.
      Returns:
      the row's id, unique within its list
    • text

      public Text text()
      The text shown in the row.
      Returns:
      the text shown in the row