org.homeunix.thecave.moss.swing.model
Class DefaultGenericListModel<T>

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.homeunix.thecave.moss.swing.model.DefaultGenericListModel<T>
All Implemented Interfaces:
java.io.Serializable, javax.swing.ListModel

public class DefaultGenericListModel<T>
extends javax.swing.AbstractListModel

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
DefaultGenericListModel()
           
 
Method Summary
 void addAllElements(java.util.Collection<T> values)
           
 void addElement(T value)
           
 void clear()
           
 T getElementAt(int index)
           
 java.util.List<T> getList()
          Get an unmodifiable link to the backing list.
 int getSize()
           
 boolean removeAllElements(java.util.Collection<T> values)
           
 boolean removeElement(T value)
           
 boolean retainAllElements(java.util.Collection<T> values)
           
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DefaultGenericListModel

public DefaultGenericListModel()
Method Detail

addElement

public void addElement(T value)

addAllElements

public void addAllElements(java.util.Collection<T> values)

removeElement

public boolean removeElement(T value)

removeAllElements

public boolean removeAllElements(java.util.Collection<T> values)

retainAllElements

public boolean retainAllElements(java.util.Collection<T> values)

clear

public void clear()

getElementAt

public T getElementAt(int index)

getSize

public int getSize()

getList

public java.util.List<T> getList()
Get an unmodifiable link to the backing list. This allows you to access the list in a foreach loop, among other List-only functions.

Returns: