Package com.vaadin.flow.internal
Class NullOwner
java.lang.Object
com.vaadin.flow.internal.NullOwner
- All Implemented Interfaces:
NodeOwner,Serializable
A stateless singleton node owner that is used for nodes that have not yet
been attached to a state tree. An instance of this type is used instead of a
null pointer to avoid cluttering implementations with null
checks.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic NullOwnerget()Gets the singleton null owner instance.booleanCheck if given node is registered to this node owner.voidmarkAsDirty(StateNode node) Marks a node owned by this instance as dirty.intRegisters a node with this node owner.voidunregister(StateNode node) Unregisters a node from this owner.
-
Method Details
-
get
Gets the singleton null owner instance.- Returns:
- the singleton instance
-
register
Description copied from interface:NodeOwnerRegisters a node with this node owner. The new node should already be set to be owned by this instance. -
unregister
Description copied from interface:NodeOwnerUnregisters a node from this owner. This must be done before the node is set to not be owned by this instance.- Specified by:
unregisterin interfaceNodeOwner- Parameters:
node- the node to unregister
-
markAsDirty
Description copied from interface:NodeOwnerMarks a node owned by this instance as dirty. Dirty nodes are collected from an owner usingStateTree.collectDirtyNodes().- Specified by:
markAsDirtyin interfaceNodeOwner- Parameters:
node- the node to be marked as dirty
-
hasNode
Description copied from interface:NodeOwnerCheck if given node is registered to this node owner.
-