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

uk.co.lucasweb.aws.v4.signer.functional.Streams Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package uk.co.lucasweb.aws.v4.signer.functional;

import java.util.Optional;
import java.util.stream.Stream;

/**
 * Provides additional functionality missing from the Stream API.
 *
 * @author Richard Lucas
 */
public final class Streams {

    private Streams() {
        // Hide public constructor
    }

    @SuppressWarnings("OptionalUsedAsFieldOrParameterType")
    public static  Stream streamopt(Optional optional) {
        return optional.map(Stream::of)
                .orElseGet(Stream::empty);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy