All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qameta.allure.tree.TreeGroup Maven / Gradle / Ivy

There is a newer version: 2.32.0
Show newest version
package io.qameta.allure.tree;

import java.util.Objects;
import java.util.Optional;
import java.util.Set;

/**
 * @author charlie (Dmitry Baev).
 */
public interface TreeGroup extends TreeNode {

    Set 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