Interface LazyLoadListModel<T>
-
- Type Parameters:
T- the class of the list items
- All Superinterfaces:
java.lang.Iterable<T>,javax.swing.ListModel<T>
- All Known Implementing Classes:
BeanListComboBoxModel,BeanListModel,FileSuggestModel
public interface LazyLoadListModel<T> extends javax.swing.ListModel<T>, java.lang.Iterable<T>A list model that supports loading the list items lazily.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAllElements(java.util.Collection<? extends T> items)Append items to the end of the list.voidaddElement(T item)Append an item to the list.voidaddMissingElements(java.util.Collection<? extends T> items)Add items to the list, skipping items that are already in the list.booleancontains(T item)Check if an item is in the list.intindexOf(java.lang.Object item)Get the index of an item in the list.voidsetElements(java.util.Collection<? extends T> items)Replace the items in the list.
-
-
-
Method Detail
-
setElements
void setElements(java.util.Collection<? extends T> items)
Replace the items in the list.- Parameters:
items- the new items
-
addElement
void addElement(T item)
Append an item to the list.- Parameters:
item- the item to append
-
addAllElements
void addAllElements(java.util.Collection<? extends T> items)
Append items to the end of the list.- Parameters:
items- the items to append
-
addMissingElements
void addMissingElements(java.util.Collection<? extends T> items)
Add items to the list, skipping items that are already in the list.- Parameters:
items- the items to add
-
indexOf
int indexOf(java.lang.Object item)
Get the index of an item in the list.- Returns:
- the index of the item or -1 if it is not in the list
-
contains
boolean contains(T item)
Check if an item is in the list.- Returns:
- true if the item is in the list
-
-