net.jqwik.api.support.CollectorsSupport Maven / Gradle / Ivy
package net.jqwik.api.support;
import java.util.*;
import java.util.stream.*;
import org.apiguardian.api.*;
import org.jspecify.annotations.*;
import static org.apiguardian.api.API.Status.*;
/**
* Provide implementation for stream to collect to LinkedHashSet in order to preserve order
* and to make random-based generation deterministic
*/
@API(status = INTERNAL)
public class CollectorsSupport {
private CollectorsSupport() {}
public static Collector> toLinkedHashSet() {
return Collectors.toCollection(LinkedHashSet::new);
}
}