Interface PromptList<T>

Type Parameters:
T - The type of objects.
All Known Subinterfaces:
PromptOperationList, PromptOptionList, SystemPromptList

@Experimental public interface PromptList<T>
Modifiable list of prompt configuration entries.
Since:
5.2.241209
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(T entry)
    The entry to be added to the list.
    @UnmodifiableView @NotNull List<T>
    get()
    Returns all entries.
    void
    remove(T entry)
    Removes the given entry from this list.
    void
    set(@NotNull List<T> list)
    Replaces all entries with the given list.
  • Method Details

    • get

      @NotNull @UnmodifiableView @NotNull List<T> get()
      Returns all entries.
      Returns:
      The list of entries contained in this list.
      Since:
      5.2.241209
    • set

      void set(@NotNull @NotNull List<T> list) throws IllegalArgumentException
      Replaces all entries with the given list.
      Parameters:
      list - The list to be used.
      Throws:
      IllegalArgumentException - If the list could not be set (e.g. if the list contains duplicates, or if specific entries can not be removed).
      Since:
      5.2.241209
    • add

      void add(@NotNull T entry) throws IllegalArgumentException
      The entry to be added to the list.
      Parameters:
      entry - The entry to add.
      Throws:
      IllegalArgumentException - If the entry could not be added (e.g. if there already is an entry with that id/name).
      Since:
      5.2.241209
    • remove

      void remove(@NotNull T entry) throws NoSuchElementException
      Removes the given entry from this list.
      Parameters:
      entry - The entry to be removed.
      Throws:
      NoSuchElementException - If the entry is not contained in this list.
      IllegalArgumentException - If the entry could not be removed (e.g. if the entry has been inherited or is based on a global preset).
      Since:
      5.2.241209