Fix DerivableSchemaNode.getOriginal()
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / ListSchemaNode.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.model.api;
9
10 import java.util.Collection;
11 import java.util.List;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.stmt.ListEffectiveStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.UniqueEffectiveStatement;
16
17 /**
18  * Interface describing YANG 'list' statement.
19  *
20  * <p>
21  * The 'list' statement is used to define an interior data node in the schema tree. A list entry is uniquely identified
22  * by the values of the list's keys, if defined.
23  */
24 public interface ListSchemaNode extends DataNodeContainer, AugmentationTarget, DerivableSchemaNode<ListSchemaNode>,
25         NotificationNodeContainer, ActionNodeContainer, ElementCountConstraintAware, MustConstraintAware,
26         EffectiveStatementEquivalent<ListEffectiveStatement> {
27     /**
28      * Returns the list of leaf identifiers.
29      *
30      * @return List of QNames of leaf identifiers of this list, empty if the list has no keys.
31      */
32     @NonNull List<@NonNull QName> getKeyDefinition();
33
34     /**
35      * YANG 'ordered-by' statement. It defines whether the order of entries within a list are determined by the user
36      * or the system. If not present, default is false.
37      *
38      * @return true if ordered-by argument is "user", false otherwise
39      */
40     boolean isUserOrdered();
41
42     /**
43      * Returns unique constraints.
44      *
45      * @return Collection of unique constraints of this list schema node
46      */
47     @NonNull Collection<? extends @NonNull UniqueEffectiveStatement> getUniqueConstraints();
48 }