Class ThemeListImpl

java.lang.Object
com.vaadin.flow.dom.impl.ThemeListImpl
All Implemented Interfaces:
ThemeList, Serializable, Iterable<String>, Collection<String>, Set<String>

public class ThemeListImpl extends Object implements ThemeList, Serializable
Default implementation for the ThemeList that provides a live view into the theme names of the corresponding element. Both reads and writes go through the element attribute, THEME_ATTRIBUTE_NAME, so that all instances obtained for the same element always agree on the current theme names.

Since the attribute value is space separated, a theme name cannot contain spaces. add(String) still accepts a space separated value for backwards compatibility, adding each theme name in it and logging a warning, but every other operation treats the value it is given as a single theme name, so remove("badge success") does not undo add("badge success").

The iterator returned by iterator() is the one exception to the live view: it iterates the theme names present when it was created.

For internal use only. May be renamed or removed in a future release.

Since:
1.0.
Author:
Vaadin Ltd
See Also: