fastutil icon indicating copy to clipboard operation
fastutil copied to clipboard

*MappedBigList should implement a FlyweightPrototype interface

Open seirl opened this issue 3 years ago • 1 comments

Currently there is no way to check dynamically if an BigList implements copy() or not. If all the MappedBigList implemented FlyweightPrototype, it would be easier to make a function that makes a threadsafe copy of any type of BigList.

Unfortunately FlyweightPrototype is in dsiutils, not fastutil, so I don't know what's the best way to proceed here.

seirl avatar Aug 04 '22 11:08 seirl

Well, it's a one-time thing, so one not using reflection? I realize the copy() might not be lightweight. But which other cases would you need to cover (except Mapped vs. non-Mapped)?

vigna avatar Sep 27 '22 18:09 vigna