Cleanup yang.model.api.meta 05/32005/2
authorRobert Varga <robert.varga@pantheon.sk>
Sat, 2 Jan 2016 13:52:02 +0000 (14:52 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 4 Jan 2016 16:21:05 +0000 (16:21 +0000)
Add proper separators, trim unneeded empty lines, clarify non-null
return of getEffectiveSubstatements().

Change-Id: Ie756cdcf26105556c8be84ccd0df271200c6a968
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/DeclaredStatement.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/EffectiveStatement.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/IdentifierNamespace.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/ModelStatement.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/StatementDefinition.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/StatementSource.java
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/meta/package-info.java

index dbe80e96f21bbc9d4ae7259fbc9aa53781b88650..54d83326a9a1ce820d30f553f4ec4e90a257cb73 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.yangtools.yang.model.api.meta;
 import java.util.Collection;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
+
 /**
  * Represents declared statement
  *
@@ -18,7 +19,6 @@ import javax.annotation.Nullable;
 public interface DeclaredStatement<A> extends ModelStatement<A> {
 
     /**
-     *
      * Returns statement argument as was present in original source.
      *
      * @return statement argument as was present in original source or null, if statement does not take argument.
@@ -26,7 +26,6 @@ public interface DeclaredStatement<A> extends ModelStatement<A> {
     @Nullable String rawArgument();
 
     /**
-     *
      * Returns collection of explicitly declared child statements, while preserving its original
      * ordering from original source.
      *
@@ -34,5 +33,4 @@ public interface DeclaredStatement<A> extends ModelStatement<A> {
      *         source of model.
      */
     @Nonnull Collection<? extends DeclaredStatement<?>> declaredSubstatements();
-
 }
index 2b1e7e052eae72e2976c6632cd2f384aa024e9ef..e3ef1c5ffec00e3caeda76c382161546a10ef8a9 100644 (file)
@@ -34,7 +34,6 @@ public interface EffectiveStatement<A, S extends DeclaredStatement<A>> extends M
     S getDeclared();
 
     /**
-     *
      * Returns value associated with supplied identifier
      *
      * @param <K>
@@ -48,15 +47,12 @@ public interface EffectiveStatement<A, S extends DeclaredStatement<A>> extends M
      * @param identifier
      *            Identifier of element.
      * @return Value if present, null otherwise.
-     *
-     *
      */
     //<K, V, N extends IdentifierNamespace<? super K, ? extends V>> V
     @Nullable
     <K,V,N extends IdentifierNamespace<K, V>> V get(@Nonnull Class<N> namespace,@Nonnull  K identifier);
 
     /**
-     *
      * Returns all local values from supplied namespace.
      *
      * @param <K>
@@ -73,11 +69,9 @@ public interface EffectiveStatement<A, S extends DeclaredStatement<A>> extends M
     <K, V, N extends IdentifierNamespace<K, V>> Map<K, V> getAll(@Nonnull Class<N> namespace);
 
     /**
+     * Returns a collection of all effective substatements.
      *
-     * Returns iteration of all effective substatements.
-     *
-     * @return iteration of all effective substatements.
+     * @return collection of all effective substatements.
      */
-    Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements();
-
+    @Nonnull Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements();
 }
index 3a28984882805ec8920d2421b3ac04c10a8579f7..4f0ed6a3693de8c4dfb4d07cabe0776e36f801a5 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.yangtools.yang.model.api.meta;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
+
 /**
- *
  * Model specific namespace which allows access to specific
  *
  * {@link IdentifierNamespace} serves as common superclass for YANG model
@@ -24,14 +24,11 @@ import javax.annotation.Nullable;
  * @param <V> Value type
  */
 public interface IdentifierNamespace<K,V> {
-
     /**
-     *
      * Returns value associated with supplied identifier
      *
      * @param identifier Identifier of value
      * @return value or null, if identifier is not present in namespace.
      */
     @Nullable V get(@Nonnull K identifier);
-
 }
index 7d4127b5478ca3dfb2cf143c7a1a7d4f67f1bb24..6ca3da481996c7fd1aa0d796d5007d104273b7e5 100644 (file)
@@ -11,7 +11,6 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 /**
- *
  * Model statement
  *
  * There are two base types of model statements:
@@ -32,7 +31,6 @@ import javax.annotation.Nullable;
  * @param <A> Argument type ({@link Void} if statement does not have argument.)
  */
 public interface ModelStatement<A> {
-
     /**
      * Statement Definition of this statement.
      *
@@ -41,7 +39,6 @@ public interface ModelStatement<A> {
     @Nonnull StatementDefinition statementDefinition();
 
     /**
-     *
      * Returns statement argument
      *
      * @return statement argument or null if statement does not have argument.
@@ -56,5 +53,4 @@ public interface ModelStatement<A> {
      * @return statement source.
      */
     @Nonnull StatementSource getStatementSource();
-
 }
index 2f7fa56720e9154234f89a6985b6122d900d7a66..cfb8488848b0e7ced7899a26ece96f2659d0a985 100644 (file)
@@ -13,7 +13,6 @@ import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.common.QName;
 
 /**
- *
  * Definition / model of YANG {@link DeclaredStatement} and {@link EffectiveStatement}.
  *
  * Statement concept is defined in RFC6020 section 6.3:
@@ -23,13 +22,9 @@ import org.opendaylight.yangtools.yang.common.QName;
  * </blockquote>
  *
  * Source: <a href="https://tools.ietf.org/html/rfc6020#section-6.3"> </a>
- *
- *
  */
 public interface StatementDefinition extends Immutable {
-
     /**
-     *
      * Returns name of the statement
      *
      * @return Name of the statement
@@ -38,7 +33,6 @@ public interface StatementDefinition extends Immutable {
     QName getStatementName();
 
     /**
-     *
      * Returns name of statement argument or null, if statement does not have
      * argument.
      *
@@ -48,7 +42,6 @@ public interface StatementDefinition extends Immutable {
     QName getArgumentName();
 
     /**
-     *
      * Returns class which represents declared version of statement associated
      * with this definition.
      *
@@ -62,7 +55,6 @@ public interface StatementDefinition extends Immutable {
     Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass();
 
     /**
-     *
      * Returns class which represents derived behaviour from supplied statement.
      *
      * This class should be interface, which defines convenience access to
@@ -73,5 +65,4 @@ public interface StatementDefinition extends Immutable {
      */
     @Nonnull
     Class<? extends EffectiveStatement<?,?>> getEffectiveRepresentationClass();
-
 }
index 315202fc0599a34d03237f67731a6f6f9e6d07ee..88a42db1538b1964f9229d519209d27bd447d2d3 100644 (file)
@@ -6,33 +6,28 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 package org.opendaylight.yangtools.yang.model.api.meta;
+
 /**
- *
  * Origin of statement
  *
  * Represents origin of statement - if it was explicitly present
  * in model representation or if it was inferred from context.
- *
  */
 public enum StatementSource {
 
     /**
-     *
      * Statement was explicitly declared by author
      * of the supplied model.
-     *
      */
     DECLARATION,
+
     /**
-     *
      * Statement was derived from context of YANG model / statement
      * and represents effective model.
      *
      * Effective context nodes are derived from applicable {@link #DECLARATION}
      * statements by interpreting their semantic meaning in context
      * of current statement.
-     *
      */
     CONTEXT
-
 }
index d871e3b8a524ad8466e285d3dcc0d80abab89b13..f3ef3127a7e5bdbeeeac2e00079cb232fe7524e5 100644 (file)
@@ -5,6 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
+
 /**
  * Meta model of YANG model as was defined in RFC6020 and extracted by analysis
  * of YANG text.