import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Map;
import java.util.NoSuchElementException;
-
import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
import org.opendaylight.yangtools.yang.model.api.SchemaNode;
import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
import org.opendaylight.yangtools.yang.model.api.meta.StatementSource;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
import org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase;
private final A argument;
- public EffectiveStatementBase(StmtContext<A, D, ?> ctx) {
+ public EffectiveStatementBase(final StmtContext<A, D, ?> ctx) {
this.stmtCtx = ctx;
this.statementDefinition = ctx.getPublicDefinition();
if(declaredSubstatement.getPublicDefinition() == Rfc6020Mapping.USES) {
substatementsInit.add(declaredSubstatement);
substatementsInit.addAll(declaredSubstatement.getEffectOfStatement());
- ((StatementContextBase)ctx).removeStatementsFromEffectiveSubstatements(declaredSubstatement
+ ((StatementContextBase<?, ?, ?>)ctx).removeStatementsFromEffectiveSubstatements(declaredSubstatement
.getEffectOfStatement());
} else {
substatementsInit.add(declaredSubstatement);
@Override
public <K, V, N extends IdentifierNamespace<K, V>> V get(
- Class<N> namespace, K identifier) {
+ final Class<N> namespace, final K identifier) {
return stmtCtx.getFromNamespace(namespace, identifier);
}
@Override
public <K, V, N extends IdentifierNamespace<K, V>> Map<K, V> getAll(
- Class<N> namespace) {
- return (Map<K, V>) stmtCtx.getAllFromNamespace(namespace);
+ final Class<N> namespace) {
+ return stmtCtx.getAllFromNamespace(namespace);
}
@Override
}
protected final <S extends EffectiveStatement<?, ?>> S firstEffective(
- Class<S> type) {
+ final Class<S> type) {
S result = null;
try {
result = type.cast(Iterables.find(substatements,
return result;
}
- protected final <S extends SchemaNode> S firstSchemaNode(Class<S> type) {
+ protected final <S extends SchemaNode> S firstSchemaNode(final Class<S> type) {
S result = null;
try {
result = type.cast(Iterables.find(substatements,
@SuppressWarnings("unchecked")
protected final <T> Collection<T> allSubstatementsOfType(
- Class<T> type) {
+ final Class<T> type) {
Collection<T> result = null;
try {
return result;
}
- protected final <T> T firstSubstatementOfType(Class<T> type) {
+ protected final <T> T firstSubstatementOfType(final Class<T> type) {
T result = null;
try {
result = type.cast(Iterables.find(substatements,
return result;
}
- protected final <R> R firstSubstatementOfType(Class<?> type,
- Class<R> returnType) {
+ protected final <R> R firstSubstatementOfType(final Class<?> type,
+ final Class<R> returnType) {
R result = null;
try {
result = returnType.cast(Iterables.find(