Type Parameters:
K - Child path argument type
V - Child Node type
All Superinterfaces:
NormalizedContainer<V>, NormalizedData, OrderingAware
All Known Subinterfaces:
ChoiceNode, ContainerNode, DataContainer, DataContainerNode, DistinctNodeContainer<K,V>, LeafSetNode<T>, MapEntryNode, MapNode, NormalizedYangData, SystemLeafSetNode<T>, SystemMapNode, UnkeyedListEntryNode, UserLeafSetNode<T>, UserMapNode
All Known Implementing Classes:
AbstractImmutableDataContainerNode, ImmutableContainerNodeBuilder.ImmutableContainerNode, ImmutableLeafSetNodeBuilder.ImmutableLeafSetNode, ImmutableMapNodeBuilder.ImmutableMapNode, ImmutableUnkeyedListEntryNodeBuilder.ImmutableUnkeyedListEntryNode, ImmutableUserLeafSetNodeBuilder.ImmutableUserLeafSetNode, ImmutableUserMapNodeBuilder.ImmutableUserMapNode

public sealed interface DistinctContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode> extends NormalizedContainer<V> permits DistinctNodeContainer<K,V>, DataContainer
A NormalizedContainer which contains distinctly-addressable children.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.data.api.schema.OrderingAware

    OrderingAware.System, OrderingAware.User
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<@NonNull V>
    Returns the body of this node.
    @Nullable V
    Returns a child node identified by provided key.
    default Optional<V>
    Attempts to find a child node identified by provided key.
    default @NonNull V
    Returns a child node identified by provided key, asserting its presence.

    Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.NormalizedContainer

    isEmpty, size

    Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.NormalizedData

    contract, name

    Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.OrderingAware

    ordering
  • Method Details

    • body

      Collection<@NonNull V> body()
      Returns the body of this node. While the return value specifies Object, this method's return value has further semantics. The returned object must be a well-published contract, such as String, Collection<NormalizedNode> or DOMSource.

      Returns iteration of all child nodes. Order of returned child nodes may be defined by subinterfaces.

      All nodes returned in this iterable, MUST also be accessible via childByArg(PathArgument) using their associated identifier.

      Specified by:
      body in interface NormalizedContainer<K extends YangInstanceIdentifier.PathArgument>
      Specified by:
      body in interface NormalizedData
      Returns:
      Iteration of all child nodes
    • childByArg

      @Nullable V childByArg(K key)
      Returns a child node identified by provided key.
      Parameters:
      key - Path argument identifying child node
      Returns:
      Matching child node, or null if no matching child exists
      Throws:
      NullPointerException - if key is null
    • findChildByArg

      default Optional<V> findChildByArg(K key)
      Attempts to find a child node identified by provided key.
      Parameters:
      key - Path argument identifying child node
      Returns:
      Optional with child node if child exists. Optional.empty() if child does not exist
      Throws:
      NullPointerException - if key is null
    • getChildByArg

      default @NonNull V getChildByArg(K key)
      Returns a child node identified by provided key, asserting its presence.
      Parameters:
      key - Path argument identifying child node
      Returns:
      Matching child node
      Throws:
      NullPointerException - if key is null
      VerifyException - if the child does not exist