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

io.qameta.allure.entity.WithLinks Maven / Gradle / Ivy

There is a newer version: 2.30.0
Show newest version
package io.qameta.allure.entity;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author charlie (Dmitry Baev).
 */
public interface WithLinks {

    List getLinks();

    void setLinks(List links);

    default void updateLinks(List links) {
        List updated = Stream.concat(getLinks().stream(), links.stream())
                .distinct()
                .collect(Collectors.toList());
        setLinks(updated);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy