Class HTMLElements.HTMLElementsWithCache

java.lang.Object
org.htmlunit.cyberneko.HTMLElements.HTMLElementsWithCache
All Implemented Interfaces:
HTMLElementsProvider
Enclosing class:
HTMLElements

public static class HTMLElements.HTMLElementsWithCache extends Object implements HTMLElementsProvider
An implementation of HTMLElementsProvider that wraps an HTMLElements instance and adds a simple cache for unknown element lookups.

This class is optimized for repeated element name lookups, especially for names that are not present in the known elements set. It avoids repeated lowercasing and unnecessary lookups for unknown elements by caching misses.

This implementation is not thread-safe.