Memory-efficient sparse array in Java

I would try with trove collections, there is TIntObjectMap which can work for your intents.

Leave a Comment