tech.kronicle.utils.NullUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kronicle-utils Show documentation
Show all versions of kronicle-utils Show documentation
Kronicle utils library that contains utility classes for use by Kronicle and its plugins
package tech.kronicle.utils;
import java.util.Objects;
import java.util.stream.Stream;
import static java.util.Objects.requireNonNull;
public final class NullUtils {
public static T firstNonNull(Stream values) {
requireNonNull(values, "values");
return values
.filter(Objects::nonNull)
.findFirst().orElse(null);
}
private NullUtils() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy