mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Add missing toArray method from JDK 11 (#531)
This commit is contained in:
parent
e95092fd43
commit
71140135fa
|
@ -16,6 +16,7 @@
|
||||||
package org.teavm.classlib.java.util;
|
package org.teavm.classlib.java.util;
|
||||||
|
|
||||||
import java.util.Spliterator;
|
import java.util.Spliterator;
|
||||||
|
import java.util.function.IntFunction;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import org.teavm.classlib.java.lang.TIterable;
|
import org.teavm.classlib.java.lang.TIterable;
|
||||||
import org.teavm.classlib.java.util.stream.TStream;
|
import org.teavm.classlib.java.util.stream.TStream;
|
||||||
|
@ -33,6 +34,10 @@ public interface TCollection<E> extends TIterable<E> {
|
||||||
|
|
||||||
<T> T[] toArray(T[] a);
|
<T> T[] toArray(T[] a);
|
||||||
|
|
||||||
|
default <T> T[] toArray(IntFunction<T[]> gen) {
|
||||||
|
return toArray(gen.apply(0));
|
||||||
|
}
|
||||||
|
|
||||||
boolean add(E e);
|
boolean add(E e);
|
||||||
|
|
||||||
boolean remove(Object o);
|
boolean remove(Object o);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user