uk.co.lucasweb.aws.v4.signer.functional.Streams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-v4-signer-java Show documentation
Show all versions of aws-v4-signer-java Show documentation
A lightweight, zero-dependency implementation of the AWS V4 signing algorithm
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);
}
}