org.opentripplanner.util.lang.SetUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.util.lang;
import java.util.Arrays;
import java.util.Collection;
import java.util.Set;
import java.util.stream.Collectors;
public class SetUtils {
/**
* Combine a number of collections into a single Set.
*/
@SafeVarargs
public static Set combine(Collection... colls) {
return Arrays.stream(colls).flatMap(Collection::stream).collect(Collectors.toSet());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy