public class ArrayModelList
extends javax.swing.AbstractListModel
Constructor and Description |
---|
ArrayModelList(java.util.List<java.lang.String> items)
Construct the ArrayModelList through the passed ArrayList object.
|
Modifier and Type | Method and Description |
---|---|
int |
addItem(java.lang.String newItem)
Add a new item to this list.
|
java.lang.String |
getElementAt(int i)
Get the item at a certain index.
|
int |
getSize()
Get the size of the stored list.
|
void |
removeItem(java.lang.String item)
Remove the given item from the list.
|
int |
updateItem(java.lang.String item,
int index)
Update the item at a given index.
|
public ArrayModelList(java.util.List<java.lang.String> items)
items
- The passed list instance.public int addItem(java.lang.String newItem)
newItem
- The new item to be added into the list.public java.lang.String getElementAt(int i)
i
- The index of item to be gotten.public int getSize()
public void removeItem(java.lang.String item)
item
- The item to be removed from the list.public int updateItem(java.lang.String item, int index)
item
- The new item to put into the list.index
- The index of the item to be replaced.