Add missing toArray method from JDK 11 (#531)

This commit is contained in:
Ivan Hetman 2020-10-26 12:02:13 +02:00 committed by GitHub
parent e95092fd43
commit 71140135fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@
package org.teavm.classlib.java.util;
import java.util.Spliterator;
import java.util.function.IntFunction;
import java.util.function.Predicate;
import org.teavm.classlib.java.lang.TIterable;
import org.teavm.classlib.java.util.stream.TStream;
@ -33,6 +34,10 @@ public interface TCollection<E> extends TIterable<E> {
<T> T[] toArray(T[] a);
default <T> T[] toArray(IntFunction<T[]> gen) {
return toArray(gen.apply(0));
}
boolean add(E e);
boolean remove(Object o);