*/
package org.opendaylight.yangtools.yang.model.api.stmt;
-import static org.opendaylight.yangtools.yang.model.api.stmt.DefaultMethodHelpers.filterOptional;
-
import com.google.common.annotations.Beta;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNull;
/**
* Common interface implemented by entities which act as the root of the {@code schema tree} and are able to resolve an
- * {@code SchemaNodeIdentifier} to a {@link SchemaTreeEffectiveStatement}.
+ * {@link SchemaNodeIdentifier} to a {@link SchemaTreeEffectiveStatement}.
*/
@Beta
public interface SchemaTreeRoot {
*/
default <T> @NonNull Optional<T> findSchemaTreeNode(final @NonNull Class<T> type,
final @NonNull SchemaNodeIdentifier path) {
- return filterOptional(type, findSchemaTreeNode(path));
+ return DefaultMethodHelpers.filterOptional(findSchemaTreeNode(path), type);
}
}