mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Collection spliterator that does not depend on how the list implementation implements spliterator()
This commit is contained in:
parent
7a2cd6ae4f
commit
c30e2d3c24
|
@ -57,10 +57,9 @@ public class TSpliterators {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public static <T> TSpliterator<T> spliterator(Collection<? extends T> c, int characteristics) {
|
public static <T> TSpliterator<T> spliterator(Collection<? extends T> c, int characteristics) {
|
||||||
return ((TCollection<T>) c).spliterator();
|
return spliterator(c.iterator(), c.size(), characteristics);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TSpliterator.OfInt spliterator(int[] array, int additionalCharacteristics) {
|
public static TSpliterator.OfInt spliterator(int[] array, int additionalCharacteristics) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user