Adopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / query / StructuralBuilder.java
index eb62b2329dc0437924b5bdc4ac3ab46595710b9b..be677bb7a688f6ff3f4c4bd82ec22752b8b499a7 100644 (file)
@@ -8,14 +8,21 @@
 package org.opendaylight.mdsal.binding.api.query;
 
 import com.google.common.annotations.Beta;
-import org.opendaylight.yangtools.concepts.CheckedBuilder;
+import org.eclipse.jdt.annotation.NonNull;
 
 /**
- * A specialization of {@link CheckedBuilder}, whose {@code build()} method throws a {@link QueryStructureException}.
+ * Builder object which {@code build()} method produces a product or throws {@link QueryStructureException}.
  *
  * @param <P> Product of builder
  */
 @Beta
-public interface StructuralBuilder<P> extends CheckedBuilder<P, QueryStructureException> {
-
+public interface StructuralBuilder<P> {
+    /**
+     * Returns instance of the product. Multiple calls to this method are not required to return same instance if
+     * the state of the builder has changed.
+     *
+     * @return A newly-built instance
+     * @throws QueryStructureException if the builder's state is not sufficiently initialized
+     */
+    @NonNull P build() throws QueryStructureException;
 }