class StreamUtilities {

    public static <T> T filterOne(Collection<? extends T> input, Predicate<? super T> predicate)
    {
        return predicate != null ? input.stream().filter(predicate).findFirst().orElse(null) : null;
    }

    private  StreamUtilities();

}