google / j2cl

Java to Closure JavaScript transpiler
Apache License 2.0
1.25k stars 146 forks source link

Add Java 10 Collections APIs #242

Closed treblereel closed 5 months ago

treblereel commented 6 months ago

Java 10 added copyOf static factory methods to produce immutable List/Set/Map instances that contain no nulls.

treblereel commented 6 months ago

@gkdn I added tests to the Java9 package, mainly because it looks more suitable than the Java8 package. Wdyt?

gkdn commented 5 months ago

Is this ready for another round?

treblereel commented 5 months ago

Is this ready for another round?

yeap, i think so

gkdn commented 5 months ago

Thanks. Doing some refactoring, will submit soon.

treblereel commented 5 months ago

Thanks. Doing some refactoring, will submit soon.

What I don't like is Collections.internalSetOf((E[]) new HashSet<>(coll).toArray()) but we need to have no nulls and it looks like it's the easiest way to achieve it