2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.data.api.schema;
10 import org.eclipse.jdt.annotation.NonNull;
13 * A {@link NormalizedNodeContainer} which preserves user supplied ordering and allows addressing of child elements by
14 * position. All implementations of this interface must also implement {@link OrderingAware.User}. This interface should
15 * not be implemented directly, but rather implementing one of it's subclasses
17 * <li>{@link UnkeyedListNode}</li>
18 * <li>{@link UserLeafSetNode}</li>
19 * <li>{@link UserMapNode}</li>
22 * @param <V> child type
24 // FIXME: 9.0.0: we really want to do a List<@NonNull V> body(), but need to reconcile that with key-based lookup in
25 // implementations -- and those are using only a Map internally.
26 public sealed interface OrderedNodeContainer<V extends NormalizedNode>
27 extends NormalizedNodeContainer<V>, OrderingAware.User
28 permits UnkeyedListNode, UserLeafSetNode, UserMapNode {
30 * Returns child node by position.
32 * @param position Position of child node
34 * @throws IndexOutOfBoundsException Out of bound Exception
36 @NonNull V childAt(int position);
42 boolean equals(Object obj);