import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.Empty;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.model.api.meta.AbstractEffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
* @param <A> Argument type ({@link Empty} if statement does not have argument.)
* @param <D> Class representing declared version of this statement.
*/
-abstract class AbstractEffectiveStatement<A, D extends DeclaredStatement<A>>
- extends AbstractModelStatement<A> implements EffectiveStatement<A, D> {
+abstract sealed class AbstractIndexedEffectiveStatement<A, D extends DeclaredStatement<A>>
+ extends AbstractEffectiveStatement<A, D>
+ permits AbstractDeclaredEffectiveStatement, AbstractUndeclaredEffectiveStatement {
@Override
public final <K, V, N extends IdentifierNamespace<K, V>> Optional<V> get(final Class<N> namespace,
final K identifier) {
return Optional.empty();
}
- /**
- * Utility method for recovering singleton lists squashed by {@link #maskList(ImmutableList)}.
- *
- * @param masked list to unmask
- * @return Unmasked list
- * @throws NullPointerException if masked is null
- * @throws ClassCastException if masked object does not match EffectiveStatement
- */
- @SuppressWarnings({ "rawtypes", "unchecked" })
- protected static final @NonNull ImmutableList<? extends @NonNull EffectiveStatement<?, ?>> unmaskList(
- final @NonNull Object masked) {
- return (ImmutableList) unmaskList(masked, EffectiveStatement.class);
- }
-
// TODO: below methods need to find a better place, this is just a temporary hideout as their public class is on
// its way out
/**