public final class WorksheetCollection extends NamedCollection<Worksheet>
Worksheet objects.| Modifier and Type | Method and Description |
|---|---|
Worksheet |
add()
Creates a new
Worksheet object and adds it to the end of the collection. |
Worksheet |
add(java.lang.String name)
Creates a new
Worksheet object with the specified name and adds it to the end of the collection. |
void |
clear()
Clears all elements from the collection.
|
Worksheet |
insert(int index)
Creates a new
Worksheet object and adds it at the specified index within the collection. |
Worksheet |
insert(int index,
java.lang.String name)
Creates a new
Worksheet object with the specified name and adds it at the specified index
within the collection. |
void |
move(Worksheet worksheet,
int index)
Moves the specified Worksheet object from its current position to the specified index.
|
void |
remove(java.lang.String name)
Removes the Worksheet object with the specified name from the collection.
|
void |
remove(Worksheet worksheet)
Removes the specified
Worksheet object from the collection. |
void |
removeAt(int index)
Removes the
Worksheet object at the specified index. |
addNamedCollectionListener, contains, get, onCollectionChanged, removeNamedCollectionListeneraddCollectionListener, contains, get, getWorkbook, indexOf, iterator, removeCollectionListener, size, trackAdd, trackClear, trackMove, trackRemove, trackReplaceadd, addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringpublic Worksheet add()
Worksheet object and adds it to the end of the collection.Worksheet object.public Worksheet add(java.lang.String name)
Worksheet object with the specified name and adds it to the end of the collection.
If a worksheet with the specified name already exists, an exception is thrown.name - The name of the new worksheet object.Worksheet object.public Worksheet insert(int index)
Worksheet object and adds it at the specified index within the collection.index - The zero-based index where the new worksheet should be added.Worksheet object.public Worksheet insert(int index, java.lang.String name)
Worksheet object with the specified name and adds it at the specified index
within the collection. If a worksheet with the specified name already exists, an exception is thrown.index - The zero-based index where the new worksheet should be added.name - The name of the new worksheet.Worksheet object.public void removeAt(int index)
Worksheet object at the specified index.index - The zero-based index of the worksheet to remove.public void remove(Worksheet worksheet)
Worksheet object from the collection.
If the worksheet is not part of the collection, the method has no effect.worksheet - The worksheet to remove.public void remove(java.lang.String name)
name - The name of the worksheet to remove.public void move(Worksheet worksheet, int index)
worksheet - The worksheet to move.index - The zero-based index representing the position to move to.