Seal YangExpr hierarchy
[yangtools.git] / xpath / yang-xpath-api / src / main / java / org / opendaylight / yangtools / yang / xpath / api / YangConstantExpr.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o.  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.xpath.api;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.concepts.Identifiable;
12 import org.opendaylight.yangtools.yang.common.QName;
13
14 /**
15  * Common interface for all YANG XPath constant expressions. Each constant has a unique {@link QName}, which acts as its
16  * globally-unique identifier.
17  *
18  * @author Robert Varga
19  */
20 @Beta
21 public sealed interface YangConstantExpr<T> extends YangExpr, Identifiable<QName> permits YangBooleanConstantExpr {
22     /**
23      * Return this constant's value.
24      *
25      * @return this constant's value.
26      */
27     // FIXME: this seems dicey w.r.t. empty nodeset constant.
28     T getValue();
29 }