Class SingleChildDataNodeContainer
- java.lang.Object
-
- org.opendaylight.yangtools.yang.data.util.SingleChildDataNodeContainer
-
- All Implemented Interfaces:
DataNodeContainer
@Beta public final class SingleChildDataNodeContainer extends Object implements DataNodeContainer
Utility DataNodeContainer containing only the specified node.
-
-
Constructor Summary
Constructors Constructor Description SingleChildDataNodeContainer(DataSchemaNode child)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<DataSchemaNode>
findDataChildByName(QName name)
Returns the child node corresponding to the specified name.Collection<DataSchemaNode>
getChildNodes()
Returns set of all child nodes defined within this DataNodeContainer.Set<GroupingDefinition>
getGroupings()
Returns set of all groupings defined within this DataNodeContainer.Set<TypeDefinition<?>>
getTypeDefinitions()
Returns set of all newly defined types within this DataNodeContainer.Set<UsesNode>
getUses()
Returns grouping nodes used ny this container.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opendaylight.yangtools.yang.model.api.DataNodeContainer
findDataChildByName, findDataTreeChild, findDataTreeChild, findDataTreeChild, getDataChildByName
-
-
-
-
Constructor Detail
-
SingleChildDataNodeContainer
public SingleChildDataNodeContainer(DataSchemaNode child)
-
-
Method Detail
-
findDataChildByName
public Optional<DataSchemaNode> findDataChildByName(QName name)
Description copied from interface:DataNodeContainer
Returns the child node corresponding to the specified name.Note that the nodes searched are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are returned instead of their matching children.- Specified by:
findDataChildByName
in interfaceDataNodeContainer
- Parameters:
name
- QName of child- Returns:
- child node of this DataNodeContainer if child with given name is present, empty otherwise
-
getChildNodes
public Collection<DataSchemaNode> getChildNodes()
Description copied from interface:DataNodeContainer
Returns set of all child nodes defined within this DataNodeContainer. Although the return type is a collection, each node is guaranteed to be present at most once.Note that the nodes returned are NOT
data nodes
, but ratherDataSchemaNode
s, henceChoiceSchemaNode
andCaseSchemaNode
are present instead of their children. This is consistent withschema tree
.- Specified by:
getChildNodes
in interfaceDataNodeContainer
- Returns:
- child nodes in lexicographical order
-
getTypeDefinitions
public Set<TypeDefinition<?>> getTypeDefinitions()
Description copied from interface:DataNodeContainer
Returns set of all newly defined types within this DataNodeContainer.- Specified by:
getTypeDefinitions
in interfaceDataNodeContainer
- Returns:
- typedef statements in lexicographical order
-
getGroupings
public Set<GroupingDefinition> getGroupings()
Description copied from interface:DataNodeContainer
Returns set of all groupings defined within this DataNodeContainer.- Specified by:
getGroupings
in interfaceDataNodeContainer
- Returns:
- grouping statements in lexicographical order
-
getUses
public Set<UsesNode> getUses()
Description copied from interface:DataNodeContainer
Returns grouping nodes used ny this container.- Specified by:
getUses
in interfaceDataNodeContainer
- Returns:
- Set of all uses nodes defined within this DataNodeContainer
-
-