Package com.oorian.html.elements
Class TableCells
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<TableCell>,Collection<TableCell>,List<TableCell>,RandomAccess,SequencedCollection<TableCell>
A specialized collection for managing HTML table cell elements.
This class extends ArrayList to provide type-safe storage and manipulation
of TableCell objects. It serves as a convenient container for managing
collections of table cells (<td> and <th> elements), offering
all the functionality of an ArrayList while ensuring type safety for table cell
operations.
Features:
- Type-safe collection specifically for
TableCellobjects - Inherits all ArrayList functionality (add, remove, iterate, etc.)
- Provides convenient storage for groups of table cells
- Useful for programmatic table generation and manipulation
- Supports both data cells (
<td>) and header cells (<th>)
Usage:
// Create a collection of table cells
TableCells cells = new TableCells();
// Add cells to the collection
cells.add(new Td("Cell 1"));
cells.add(new Td("Cell 2"));
cells.add(new Th("Header"));
// Iterate over cells
for (TableCell cell : cells) {
cell.setBackgroundColor("#f0f0f0");
}
// Use in table row construction
Tr row = new Tr();
for (TableCell cell : cells) {
row.addElement(cell);
}
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
TableCells
public TableCells()
-