public class ElementAttributeMap extends NodeMap
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
ElementAttributeMap(StateNode node)
Creates a new element attribute map for the given node.
|
Modifier and Type | Method and Description |
---|---|
Stream<String> |
attributes()
Gets the attribute names.
|
String |
get(String attribute)
Gets the value of an attribute.
|
boolean |
has(String attribute)
Checks whether an attribute with the given name has been set.
|
Serializable |
remove(String attribute)
Removes the named attribute.
|
void |
set(String attribute,
String value)
Sets the given attribute to the given value.
|
void |
setResource(String attribute,
AbstractStreamResource resource)
Sets the given attribute to the given
StreamResource value. |
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, producePutChange, put, put, updateFromClient
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
public ElementAttributeMap(StateNode node)
node
- the node that the map belongs topublic void set(String attribute, String value)
attribute
- the attribute namevalue
- the valuepublic boolean has(String attribute)
attribute
- the name of the attributetrue
if there is a property with the given name;
false
if there is no propertypublic Serializable remove(String attribute)
public Stream<String> attributes()
public void setResource(String attribute, AbstractStreamResource resource)
StreamResource
value.attribute
- the attribute nameresource
- the valueCopyright © 2022. All rights reserved.