2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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 com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.yangtools.concepts.ItemOrder.Ordered;
13 import org.opendaylight.yangtools.concepts.ItemOrder.Unordered;
14 import org.opendaylight.yangtools.yang.common.Ordering;
17 * Marker interfaces for {@link NormalizedNodeContainer}s which have distinct ordering requirements.
21 public sealed interface OrderingAware permits NormalizedNodeContainer, OrderingAware.System, OrderingAware.User {
23 * Marker interface for NormalizedNodeContainer implementations which correspond to {@code ordered-by system}. These
24 * follow the {@link Unordered} contract.
26 non-sealed interface System extends OrderingAware, Unordered {
28 default Ordering ordering() {
29 return Ordering.SYSTEM;
34 * Marker interface for NormalizedNodeContainer implementations which correspond to {@code ordered-by user}. These
35 * follow the {@link Ordered} contract.
37 non-sealed interface User extends OrderingAware, Ordered {
39 default Ordering ordering() {
45 * Ordering items within this object.
47 * @return This object's item ordering.