io.qameta.allure.tree.TreeGroup Maven / Gradle / Ivy
package io.qameta.allure.tree;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* @author charlie (Dmitry Baev).
*/
public interface TreeGroup extends TreeNode {
List getChildren();
void addChild(TreeNode node);
default Optional findNodeOfType(final String name, final Class type) {
return getChildren().stream()
.filter(type::isInstance)
.map(type::cast)
.filter(node -> Objects.equals(node.getName(), name))
.findFirst();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy