fa045b2a4122ece820c4882d51f235ecc5498cb3
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / presence / RegularPresenceEffectiveStatement.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.presence;
9
10 import static java.util.Objects.requireNonNull;
11
12 import com.google.common.collect.ImmutableList;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.PresenceStatement;
16
17 final class RegularPresenceEffectiveStatement extends AbstractPresenceEffectiveStatement {
18     private final @NonNull ImmutableList<? extends EffectiveStatement<?, ?>> substatements;
19
20     RegularPresenceEffectiveStatement(final PresenceStatement declared,
21             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
22         super(declared);
23         this.substatements = requireNonNull(substatements);
24     }
25
26     @Override
27     public ImmutableList<? extends EffectiveStatement<?, ?>> effectiveSubstatements() {
28         return substatements;
29     }
30 }