*
* @param <T> Type of leaf node values.
*/
-public interface LeafSetNode<T>
- extends DistinctNodeContainer<NodeWithValue<?>, LeafSetEntryNode<T>>, DataContainerChild, MixinNode {
+public sealed interface LeafSetNode<T>
+ extends DistinctNodeContainer<NodeWithValue<?>, LeafSetEntryNode<T>>, DataContainerChild, MixinNode
+ permits SystemLeafSetNode, UserLeafSetNode {
@Override
@SuppressWarnings("rawtypes")
Class<? extends LeafSetNode> contract();
* This node maps to the list node in YANG schema, schema and semantics of this node, its children and key construction
* is defined by YANG {@code list} statement and its {@code key} and {@code ordered-by} substatements.
*/
-public interface MapNode
- extends DistinctNodeContainer<NodeIdentifierWithPredicates, MapEntryNode>, DataContainerChild, MixinNode {
+public sealed interface MapNode
+ extends DistinctNodeContainer<NodeIdentifierWithPredicates, MapEntryNode>, DataContainerChild, MixinNode
+ permits SystemMapNode, UserMapNode {
@Override
Class<? extends MapNode> contract();
*
* @param <T> Value type of Leaf entries
*/
-// // FIXME: 9.0.0: we really want to do a Set<@NonNull V> body(), but need to reconcile that with key-based lookup in
-// implementations -- and those are using only a Map internally.
-public interface SystemLeafSetNode<T> extends LeafSetNode<T>, OrderingAware.System {
+// FIXME: 9.0.0: we really want to do a Set<@NonNull V> body(), but need to reconcile that with key-based lookup in
+// implementations -- and those are using only a Map internally.
+public non-sealed interface SystemLeafSetNode<T> extends LeafSetNode<T>, OrderingAware.System {
@Override
@SuppressWarnings("rawtypes")
default Class<SystemLeafSetNode> contract() {
* {@link MapNode} which additionally preserves user-supplied ordering. This node represents a data instance of
* a {@code list} with {@code ordered-by user;} substatement and a {@code key} definition.
*/
-public interface SystemMapNode extends MapNode, OrderingAware.System {
+public non-sealed interface SystemMapNode extends MapNode, OrderingAware.System {
@Override
default Class<SystemMapNode> contract() {
return SystemMapNode.class;
*
* @param <T> Value type of Leaf entries
*/
-public interface UserLeafSetNode<T> extends LeafSetNode<T>, OrderedNodeContainer<LeafSetEntryNode<T>> {
+public non-sealed interface UserLeafSetNode<T> extends LeafSetNode<T>, OrderedNodeContainer<LeafSetEntryNode<T>> {
@Override
@SuppressWarnings("rawtypes")
default Class<UserLeafSetNode> contract() {
* {@link MapNode} which additionally preserves user-supplied ordering. This node represents a data instance of
* a {@code list} with {@code ordered-by user;} substatement and a {@code key} definition.
*/
-public interface UserMapNode extends MapNode, OrderedNodeContainer<MapEntryNode> {
+public non-sealed interface UserMapNode extends MapNode, OrderedNodeContainer<MapEntryNode> {
@Override
default Class<UserMapNode> contract() {
return UserMapNode.class;