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

com.nls.util.ListUtil Maven / Gradle / Ivy

There is a newer version: 1.0.14
Show newest version
package com.nls.util;

import java.util.Collection;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public final class ListUtil {

    private ListUtil() {
    }

    public static  List map(Collection collection, Function mapper) {
        return map(collection.stream(), mapper);
    }

    public static  List map(Stream stream, Function mapper) {
        return stream.map(mapper).collect(Collectors.toList());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy