d5e30e8c2ecc538261272dd87d3c3a0bf6cd41a1
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / EmptyConfigEffectiveStatement.java
1 /**
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.stmt.rfc6020;
9
10 import com.google.common.collect.ImmutableList;
11 import java.util.Collection;
12 import java.util.Map;
13 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
14 import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
15 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
16 import org.opendaylight.yangtools.yang.model.api.meta.StatementSource;
17 import org.opendaylight.yangtools.yang.model.api.stmt.ConfigStatement;
18 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.ConfigEffectiveStatement;
19
20 abstract class EmptyConfigEffectiveStatement implements ConfigEffectiveStatement {
21     static final EmptyConfigEffectiveStatement FALSE = new EmptyConfigEffectiveStatement() {
22         @Override
23         public ConfigStatement getDeclared() {
24             return EmptyConfigStatement.FALSE;
25         }
26     };
27
28     static final EmptyConfigEffectiveStatement TRUE = new EmptyConfigEffectiveStatement() {
29         @Override
30         public ConfigStatement getDeclared() {
31             return EmptyConfigStatement.TRUE;
32         }
33     };
34
35     private EmptyConfigEffectiveStatement() {
36         // Hidden
37     }
38
39     @Override
40     public final StatementDefinition statementDefinition() {
41         return getDeclared().statementDefinition();
42     }
43
44     @Override
45     public final Boolean argument() {
46         return getDeclared().argument();
47     }
48
49     @Override
50     public final StatementSource getStatementSource() {
51         return getDeclared().getStatementSource();
52     }
53
54     @Override
55     public final <K, V, N extends IdentifierNamespace<K, V>> V get(final Class<N> namespace, final K identifier) {
56         throw new UnsupportedOperationException("Not implemented yet.");
57     }
58
59     @Override
60     public final <K, V, N extends IdentifierNamespace<K, V>> Map<K, V> getAll(final Class<N> namespace) {
61         throw new UnsupportedOperationException("Not implemented yet.");
62     }
63
64     @Override
65     public final Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements() {
66         return ImmutableList.of();
67     }
68 }