a7f5a9e40078bb418060d580495d96bb0920ce57
[yangtools.git] / data / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / LeafNode.java
1 /*
2  * Copyright (c) 2014 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.data.api.schema;
9
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
11
12 /**
13  * Leaf node with multiplicity 0..1.
14  *
15  * <p>
16  * Leaf node has a value, but no child nodes in the data tree, schema
17  * for leaf node and its value is described by {@link org.opendaylight.yangtools.yang.model.api.LeafSchemaNode}.
18  *
19  * @param <T> Value type
20  */
21 public interface LeafNode<T> extends ValueNode<T>, DataContainerChild {
22     @Override
23     @SuppressWarnings("rawtypes")
24     default Class<LeafNode> contract() {
25         return LeafNode.class;
26     }
27
28     @Override
29     NodeIdentifier getIdentifier();
30 }