java.util.stream.Stream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtransc-rt Show documentation
Show all versions of jtransc-rt Show documentation
JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.
The newest version!
package java.util.stream;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Optional;
import java.util.function.*;
public interface Stream extends BaseStream> {
Stream filter(Predicate super T> predicate);
Stream map(Function super T, ? extends R> mapper);
IntStream mapToInt(ToIntFunction super T> mapper);
LongStream mapToLong(ToLongFunction super T> mapper);
DoubleStream mapToDouble(ToDoubleFunction super T> mapper);
Stream flatMap(Function super T, ? extends Stream extends R>> mapper);
IntStream flatMapToInt(Function super T, ? extends IntStream> mapper);
LongStream flatMapToLong(Function super T, ? extends LongStream> mapper);
DoubleStream flatMapToDouble(Function super T, ? extends DoubleStream> mapper);
Stream distinct();
Stream sorted();
Stream sorted(Comparator super T> comparator);
Stream peek(Consumer super T> action);
Stream limit(long maxSize);
Stream skip(long n);
void forEach(Consumer super T> action);
void forEachOrdered(Consumer super T> action);
Object[] toArray();
A[] toArray(IntFunction generator);
T reduce(T identity, BinaryOperator accumulator);
Optional reduce(BinaryOperator accumulator);
U reduce(U identity, BiFunction accumulator, BinaryOperator combiner);
R collect(Supplier supplier, BiConsumer accumulator, BiConsumer combiner);
R collect(Collector super T, A, R> collector);
Optional min(Comparator super T> comparator);
Optional max(Comparator super T> comparator);
long count();
boolean anyMatch(Predicate super T> predicate);
boolean allMatch(Predicate super T> predicate);
boolean noneMatch(Predicate super T> predicate);
Optional findFirst();
Optional findAny();
static Builder builder() {
throw new RuntimeException("Not implemented");
}
static Stream empty() {
throw new RuntimeException("Not implemented");
}
static Stream of(T t) {
throw new RuntimeException("Not implemented");
}
@SafeVarargs
@SuppressWarnings("varargs") // Creating a stream from an array is safe
static Stream of(T... values) {
throw new RuntimeException("Not implemented");
}
static Stream iterate(final T seed, final UnaryOperator f) {
throw new RuntimeException("Not implemented");
}
static Stream generate(Supplier s) {
throw new RuntimeException("Not implemented");
}
static Stream concat(Stream extends T> a, Stream extends T> b) {
throw new RuntimeException("Not implemented");
}
interface Builder extends Consumer {
@Override
void accept(T t);
default Builder add(T t) {
accept(t);
return this;
}
Stream build();
}
}