Use Empty instead of Void for argument
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / meta / EffectiveStatement.java
index b47a301dce203c4c3cf98495cd5d7ff3429b9716..fe8d8b2522299bdc586ae654ec6915c863444ec0 100644 (file)
@@ -7,8 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.model.api.meta;
 
-import static java.util.Objects.requireNonNull;
-
 import com.google.common.annotations.Beta;
 import java.util.Collection;
 import java.util.Map;
@@ -16,11 +14,12 @@ import java.util.Optional;
 import java.util.stream.Stream;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yangtools.yang.common.Empty;
 
 /**
  * Effective model statement which should be used to derive application behaviour.
  *
- * @param <A> Argument type ({@link Void} if statement does not have argument.)
+ * @param <A> Argument type ({@link Empty} if statement does not have argument.)
  * @param <D> Class representing declared version of this statement.
  */
 public interface EffectiveStatement<A, D extends DeclaredStatement<A>> extends ModelStatement<A> {
@@ -59,28 +58,12 @@ public interface EffectiveStatement<A, D extends DeclaredStatement<A>> extends M
      */
     <K, V, N extends IdentifierNamespace<K, V>> @NonNull Map<K, V> getAll(@NonNull Class<N> namespace);
 
-    /**
-     * Returns all local values from supplied namespace.
-     *
-     * @param <K> Identifier type
-     * @param <V> Value type
-     * @param <N> Namespace identifier type
-     * @param namespace Namespace type
-     * @return Key-value mappings, empty if the namespace does not exist.
-     * @throws NullPointerException if namespace is null
-     * @deprecated Use {@link #getAll(Class)} instead
-     */
-    @Deprecated(forRemoval = true)
-    default <K, V, N extends IdentifierNamespace<K, V>> @NonNull Map<K, V> findAll(final @NonNull Class<N> namespace) {
-        return getAll(requireNonNull(namespace));
-    }
-
     /**
      * Returns a collection of all effective substatements.
      *
      * @return collection of all effective substatements.
      */
-    @NonNull Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements();
+    @NonNull Collection<? extends @NonNull EffectiveStatement<?, ?>> effectiveSubstatements();
 
     /**
      * Find the first effective substatement of specified type.