Currently, converting to java.util.List/Set/Map requires a full copy.
Options:
- Add
ImmutableList/Set/Map.asJava() that returns a read-only java.util.List/Set/Map view
- Change
ImmutableList/Set/Map to extend java.util.List/Set/Map
Currently impossible due to method name clashes, but upstream is considering to rename add -> adding, etc.
(1) gives a cleaner API and implementation, whereas (2) avoids the downsides of wrapping.
Currently, converting to
java.util.List/Set/Maprequires a full copy.Options:
ImmutableList/Set/Map.asJava()that returns a read-onlyjava.util.List/Set/MapviewImmutableList/Set/Mapto extendjava.util.List/Set/MapCurrently impossible due to method name clashes, but upstream is considering to rename
add->adding, etc.(1) gives a cleaner API and implementation, whereas (2) avoids the downsides of wrapping.