Class OneClickList
java.lang.Object
com.illumon.iris.gui.util.oneclick.OneClickList
- All Implemented Interfaces:
Comparable<OneClickList>
,Iterable<String>
-
Constructor Summary
ConstructorsConstructorDescriptionOneClickList
(String name) OneClickList
(String name, Collection<String> values) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an item to the list.protected void
addAll
(Collection<String> other) void
clear()
int
compareTo
(OneClickList other) Sorts OneClickLists by pinned (first), then by name.boolean
containsAll
(Collection<String> other) boolean
boolean
boolean
getItems()
getName()
boolean
isEmpty()
iterator()
protected void
setIsUppercase
(boolean value) Set uppercase enforcement.protected void
protected void
setPinned
(boolean value) protected void
setSorted
(boolean value) Set the sorting state of the list.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OneClickList
-
OneClickList
-
-
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 withadd()
will uppercase the input. -
getItems
-
getItemsCopy
-
getName
-
setName
-
clear
public void clear() -
containsAll
-
addAll
-
add
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
-
compareTo
Sorts OneClickLists by pinned (first), then by name.- Specified by:
compareTo
in interfaceComparable<OneClickList>
-
toString
-