Class Elements

java.lang.Object
com.oorian.html.Elements
All Implemented Interfaces:
Iterable<Element>, Collection<Element>, List<Element>, SequencedCollection<Element>

public class Elements extends Object implements List<Element>
A thread-safe collection class for managing HTML elements.

Elements provides a synchronized list implementation specifically designed for storing and managing Element objects. This class wraps a thread-safe list to ensure safe concurrent access in multi-threaded environments such as web applications.

Features:

  • Thread-safe list implementation using synchronized collections
  • Full List interface implementation for standard collection operations
  • Copy constructor for creating independent copies of element collections
  • Type-safe storage specifically for Element objects

Usage:


 Elements elements = new Elements();
 elements.add(new Div());
 elements.add(new Paragraph("Hello"));

 // Create a copy
 Elements copy = elements.getCopy();
 
Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also: