io.qameta.allure.entity.EntityUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of allure-plugin-api Show documentation
Show all versions of allure-plugin-api Show documentation
Module allure-plugin-api of Allure Framework.
package io.qameta.allure.entity;
import java.util.Objects;
import java.util.stream.Stream;
/**
* Contains utils for generated entities.
*
* @since 2.0
*/
/*package private*/ final class EntityUtils {
private EntityUtils() {
throw new IllegalStateException("Do not instance");
}
@SafeVarargs
public static T firstNonNull(final T... items) {
return Stream.of(items)
.filter(Objects::nonNull)
.findFirst()
.orElseThrow(() -> new IllegalStateException("At least one argument should be not null"));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy