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

com.jongsoft.lang.collection.Collectors Maven / Gradle / Ivy

The newest version!
package com.jongsoft.lang.collection;

import com.jongsoft.lang.collection.support.Collections;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.stream.Collector;

public class Collectors {

    private Collectors() {
        // hidden utility constructor
    }

    public static  Collector, List> toList() {
        return Collections.collector(com.jongsoft.lang.Collections::List);
    }

    public static  Collector, Set> toSet() {
        return Collections.collector(com.jongsoft.lang.Collections::Set);
    }

    public static  Collector, Set> toSorted(Comparator comparator) {
        return Collections.collector(x -> com.jongsoft.lang.Collections.Set(comparator, x));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy