net.jqwik.engine.properties.arbitraries.ReportableStream Maven / Gradle / Ivy
The newest version!
package net.jqwik.engine.properties.arbitraries;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import net.jqwik.engine.support.*;
import org.jspecify.annotations.*;
public class ReportableStream implements Stream {
private final List values;
private final Stream stream;
ReportableStream(List list) {
this.values = list;
this.stream = list.stream();
}
public List values() {
return values;
}
@Override
public String toString() {
return String.format("%s.of(%s)", getClass().getName(), JqwikStringSupport.displayString(values));
}
@Override
public Stream filter(final Predicate super T> predicate) {
return stream.filter(predicate);
}
@Override
public Stream map(final Function super T, ? extends R> mapper) {
return stream.map(mapper);
}
@Override
public IntStream mapToInt(final ToIntFunction super T> mapper) {
return stream.mapToInt(mapper);
}
@Override
public LongStream mapToLong(final ToLongFunction super T> mapper) {
return stream.mapToLong(mapper);
}
@Override
public DoubleStream mapToDouble(final ToDoubleFunction super T> mapper) {
return stream.mapToDouble(mapper);
}
@Override
public Stream flatMap(final Function super T, ? extends Stream extends R>> mapper) {
return stream.flatMap(mapper);
}
@Override
public IntStream flatMapToInt(final Function super T, ? extends IntStream> mapper) {
return stream.flatMapToInt(mapper);
}
@Override
public LongStream flatMapToLong(final Function super T, ? extends LongStream> mapper) {
return stream.flatMapToLong(mapper);
}
@Override
public DoubleStream flatMapToDouble(final Function super T, ? extends DoubleStream> mapper) {
return stream.flatMapToDouble(mapper);
}
@Override
public Stream distinct() {
return stream.distinct();
}
@Override
public Stream sorted() {
return stream.sorted();
}
@Override
public Stream sorted(final Comparator super T> comparator) {
return stream.sorted(comparator);
}
@Override
public Stream peek(final Consumer super T> action) {
return stream.peek(action);
}
@Override
public Stream limit(final long maxSize) {
return stream.limit(maxSize);
}
@Override
public Stream skip(final long n) {
return stream.skip(n);
}
@Override
public void forEach(final Consumer super T> action) {
stream.forEach(action);
}
@Override
public void forEachOrdered(final Consumer super T> action) {
stream.forEachOrdered(action);
}
@Override
public Object[] toArray() {
return stream.toArray();
}
@Override
public A[] toArray(final IntFunction generator) {
return stream.toArray(generator);
}
@Override
public T reduce(final T identity, final BinaryOperator accumulator) {
return stream.reduce(identity, accumulator);
}
@Override
public Optional reduce(final BinaryOperator accumulator) {
return stream.reduce(accumulator);
}
@Override
public U reduce(final U identity, final BiFunction accumulator, final BinaryOperator combiner) {
return stream.reduce(identity, accumulator, combiner);
}
@Override
public R collect(final Supplier supplier, final BiConsumer accumulator, final BiConsumer combiner) {
return stream.collect(supplier, accumulator, combiner);
}
@Override
public R collect(final Collector super T, A, R> collector) {
return stream.collect(collector);
}
@Override
public Optional min(final Comparator super T> comparator) {
return stream.min(comparator);
}
@Override
public Optional max(final Comparator super T> comparator) {
return stream.max(comparator);
}
@Override
public long count() {
return stream.count();
}
@Override
public boolean anyMatch(final Predicate super T> predicate) {
return stream.anyMatch(predicate);
}
@Override
public boolean allMatch(final Predicate super T> predicate) {
return stream.allMatch(predicate);
}
@Override
public boolean noneMatch(final Predicate super T> predicate) {
return stream.noneMatch(predicate);
}
@Override
public Optional findFirst() {
return stream.findFirst();
}
@Override
public Optional findAny() {
return stream.findAny();
}
@Override
public Iterator iterator() {
return stream.iterator();
}
@Override
public Spliterator spliterator() {
return stream.spliterator();
}
@Override
public boolean isParallel() {
return stream.isParallel();
}
@Override
public Stream sequential() {
return stream.sequential();
}
@Override
public Stream parallel() {
return stream.parallel();
}
@Override
public Stream unordered() {
return stream.unordered();
}
@Override
public Stream onClose(final Runnable closeHandler) {
return stream.onClose(closeHandler);
}
@Override
public void close() {
stream.close();
}
}