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

no.finn.lambdacompanion.Streams Maven / Gradle / Ivy

There is a newer version: 0.27
Show newest version
package no.finn.lambdacompanion;

import java.util.Collection;
import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public final class Streams {

    public static  ExtendedStream stream(final Collection collection) {
        return stream(collection.stream());
    }

    public static  ExtendedStream stream(final Stream stream) {
        return ExtendedStream.of(stream);
    }

    public static , K, U> Collector> entryToMap() {
        return Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy