48c5c5e8740ce94faeb20a0eebdd7e1232adc351
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / xpath / XPathResult.java
1 /*
2  * Copyright (c) 2015 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.xpath;
9
10 import com.google.common.annotations.Beta;
11 import javax.annotation.Nonnull;
12
13 /**
14  * Base interface for various things an XPath evaluation can return.
15  *
16  * @param <T> type of returned value
17  *
18  * FIXME: do we want to support all the modes of
19  *        <a href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathResultType">DOM XPath</a> ?
20  *        The default DataTree (yang-data-impl) implementation can support ORDERED_NODE_SNAPSHOT_TYPE. The clustered
21  *        datastore may want to implement ORDERED_NODE_ITERATOR_TYPE (via iterators).
22  */
23 @Beta
24 public interface XPathResult<T> {
25     /**
26      * Get the value contained in this result.
27      *
28      * @return Result value
29      */
30     @Nonnull T getValue();
31 }