*/
package org.opendaylight.mdsal.binding.generator.impl.rt;
-import com.google.common.annotations.Beta;
-import com.google.common.collect.Collections2;
-import java.util.Collection;
import java.util.List;
import org.opendaylight.mdsal.binding.model.api.GeneratedType;
import org.opendaylight.mdsal.binding.model.api.JavaTypeName;
import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
import org.opendaylight.yangtools.yang.model.api.stmt.ChoiceEffectiveStatement;
-@Beta
public final class DefaultChoiceRuntimeType extends AbstractCompositeRuntimeType<ChoiceEffectiveStatement>
implements ChoiceRuntimeType {
public DefaultChoiceRuntimeType(final GeneratedType bindingType, final ChoiceEffectiveStatement statement,
}
@Override
- public Collection<CaseRuntimeType> validCaseChildren() {
- return (Collection) Collections2.filter(schemaTreeChildren(), CaseRuntimeType.class::isInstance);
+ public List<CaseRuntimeType> validCaseChildren() {
+ return schemaTree(CaseRuntimeType.class);
}
@Override
public CaseRuntimeType bindingCaseChild(final JavaTypeName typeName) {
final var child = bindingChild(typeName);
- return child instanceof CaseRuntimeType ? (CaseRuntimeType) child : null;
+ return child instanceof CaseRuntimeType caseChild ? caseChild : null;
}
}