Class OneClickList

java.lang.Object
com.illumon.iris.gui.util.oneclick.OneClickList
All Implemented Interfaces:
Comparable<OneClickList>, Iterable<String>

public class OneClickList extends Object implements Iterable<String>, Comparable<OneClickList>
  • Constructor Details

  • Method Details

    • getIsPinned

      public boolean getIsPinned()
    • setPinned

      protected void setPinned(boolean value)
    • getIsSorted

      public boolean getIsSorted()
    • setSorted

      protected void setSorted(boolean value)
      Set the sorting state of the list. When this transitions from false to true the internal list will be sorted.
    • getIsUppercase

      public boolean getIsUppercase()
    • setIsUppercase

      protected void setIsUppercase(boolean value)
      Set uppercase enforcement. When this value is set to true, the internal collection will NOT be modified, but any item inserted with add() will uppercase the input.
    • getItems

      public Collection<String> getItems()
    • getItemsCopy

      public Collection<String> getItemsCopy()
    • getName

      public String getName()
    • setName

      protected void setName(String name)
    • clear

      public void clear()
    • containsAll

      public boolean containsAll(Collection<String> other)
    • addAll

      protected void addAll(Collection<String> other)
    • add

      public void add(String item)
      Add an item to the list. If the list is set as uppercase enforcing, it will uppercase the input. If the list is set as sorted, it will insert the item in the correct place to maintain the sort. If the item already exists, it will not be added again.
      Parameters:
      item - The item to insert.
    • isEmpty

      public boolean isEmpty()
    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • compareTo

      public int compareTo(@NotNull OneClickList other)
      Sorts OneClickLists by pinned (first), then by name.
      Specified by:
      compareTo in interface Comparable<OneClickList>
    • toString

      public String toString()
      Overrides:
      toString in class Object