public class NodeInfoList extends Object
Used to keep track of a line of objects in a list.
| Constructor and Description |
|---|
NodeInfoList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLine(Object ob)
Adds a line to the list
|
void |
addLine(Object ob,
int index)
Adds a line to the list at the specified position.
|
Vector |
allLines()
Returns the vector holding all lines.
|
void |
clearLine(int index)
Removes the line at the specified position
|
void |
clearLines()
Clears the list of lines.
|
void |
clearLines(int[] lines)
Sorts the list of lines and then removes the specified lines from the
list.
|
Enumeration |
elements()
Returns an enumeration of the list's elements.
|
Object |
getLine(int index)
Returns the line at the specified index
|
int |
getVisualRowCount()
Returns the size of the list
|
void |
moveElement(int from,
int to)
Moves an element in the list to a new position
|
void |
setLine(Object ob,
int index)
Replaces the line at the specified index with the new line.
|
int |
size()
Returns the size of the list.
|
void |
sort(Comparator c)
Sorts the list using the supplied comparator as argument to
Collections.sort(List, Comparator).
|
public Enumeration elements()
public Vector allLines()
public void sort(Comparator c)
c - the comparatorpublic int getVisualRowCount()
public void addLine(Object ob)
ob - the linepublic void addLine(Object ob, int index)
ob - the lineindex - the position of the linepublic void setLine(Object ob, int index)
ob - the new lineindex - the position of the linepublic Object getLine(int index)
index - the position of the linepublic void clearLines()
public void clearLines(int[] lines)
lines - the array of indexes to remove from the list.public void moveElement(int from,
int to)
from - the current positionto - the new positionpublic void clearLine(int index)
index - the position of the linepublic int size()
Copyright © 2006–2020 Esito AS. All rights reserved.