|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.editor.viewers.MockCentralTableModel<T>
T - public class MockCentralTableModel<T>
A Class used to model MockCentralNode data that is to be
displayed in a table.
| Constructor Summary | |
|---|---|
MockCentralTableModel()
|
|
| Method Summary | |
|---|---|
void |
add(int i,
T element)
Adds the supplied element to the model. |
void |
add(T element)
Adds the supplied element to the model. |
void |
addAll(java.util.List<T> list)
Adds all of the elements in the supplied list to the model. |
void |
clear()
Clears the list of all elements. |
java.lang.Object |
clone()
|
boolean |
contains(T element)
Returns whether the current list contains the supplied element. |
java.util.List<T> |
elements()
Returns the current list of elements. |
T |
get(int index)
Returns the element at the given index. |
T |
getSelectedObject()
Returns the currently selected Object in the table. |
int |
indexOf(T element)
Returns the index of the supplied element. |
boolean |
isEmpty()
Returns whether the list of elements is empty. |
T |
remove(int index)
Removes the element at the given index, returning it. |
void |
set(int i,
T element)
Sets the element at the supplied index to the given element. |
void |
setSelectedObject(T selectedObject)
Sets the the currently selected Object in the table. |
int |
size()
Returns the size of the list of elements. |
void |
sortElements(java.util.Comparator<T> comparator)
Sorts all of the elements using the supplied Comparator. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockCentralTableModel()
| Method Detail |
|---|
public void add(T element)
element - the element to add.
public void add(int i,
T element)
i - the index at which to add the element.element - the element to add.public void addAll(java.util.List<T> list)
list - the list containing the elements to add.
public void set(int i,
T element)
i - the index.element - the element to set.public int size()
public java.util.List<T> elements()
public int indexOf(T element)
element - the element.
public T get(int index)
index - the index.
public T remove(int index)
index - the index.
public void clear()
public boolean isEmpty()
public boolean contains(T element)
element - the element.
public void sortElements(java.util.Comparator<T> comparator)
Comparator.
comparator - the Comparator.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic T getSelectedObject()
public void setSelectedObject(T selectedObject)
selectedObject - the Object to select.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||