BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / api / ConstraintsBuilder.java
index 2d3649681b6bc4859b69e7e5a3cc2f506f45e51e..4d1cd8961bf34ee3af61ed3371b2981c24e7628a 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -7,11 +8,14 @@
 package org.opendaylight.yangtools.yang.parser.builder.api;
 
 import java.util.Set;
-
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.model.api.ConstraintDefinition;
 import org.opendaylight.yangtools.yang.model.api.MustDefinition;
 
+/**
+ * @deprecated Pre-Beryllium implementation, scheduled for removal.
+ */
+@Deprecated
 public interface ConstraintsBuilder extends Builder<ConstraintDefinition> {
 
     /**
@@ -66,7 +70,7 @@ public interface ConstraintsBuilder extends Builder<ConstraintDefinition> {
      *
      * This constraint has meaning only if associated node is list or leaf-list.
      *
-     * @param minElements
+     * @param maxElements
      *            number of maximum required elements.
      */
     void setMaxElements(Integer maxElements);
@@ -113,15 +117,17 @@ public interface ConstraintsBuilder extends Builder<ConstraintDefinition> {
     /**
      * Sets mandatory status of parent node
      *
-     * @param mandatory
+     * @param mandatory mandatory status
      */
     void setMandatory(boolean mandatory);
 
     /**
      * Build constraint definition
      *
-     * @return
+     * @return instance of ConstraintDefinition created from this builder
+     *
+     * @deprecated Use {@link #build()} instead
      */
+    @Deprecated
     ConstraintDefinition toInstance();
-
 }
\ No newline at end of file