Fix eclipse/checkstyle warnings
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / xpath / OptimizableXPathExpression.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  * Interface implemented by {@link XPathExpression}s which can be further optimized for execution efficiency at the
15  * expense of additional processing being performed on them. The decision to optimize a particular expression is left
16  * to the user's discretion.
17  *
18  * <p>
19  * Implementations supporting profile-driven and similar optimizations which depend on data being gathered during
20  * evaluation should not implement this interface, but rather perform these optimizations transparently behind the
21  * scenes. That implies the users can expect those optimizations not interfering with the user's ability to evaluate
22  * the expression.
23  */
24 @Beta
25 public interface OptimizableXPathExpression extends XPathExpression {
26     /**
27      * Perform optimization of this expression. If an implementation supports different levels of optimization, it
28      * should return an {@link OptimizableXPathExpression} as a result of progressing optimizations for as long as
29      * it determines further processing can result in execution benefits. Note this expression is expected to remain
30      * unchanged.
31      *
32      * @return An optimized version of this expression.
33      */
34     @Nonnull XPathExpression optimizeExpression();
35 }