I plan to write some implementations for misssing collections in lejos.
Following basic collections are still missing (if I am not wrong):
- LinkedList as another List
- Sets like HashSet, TreeSet
- Maps like HashMap, TreeMap
There have to be offered in 2 versions:
as synchronized and non-synchronized ones (makes huge performance differences)
Forget about the synchronized ones. Focus on the non-synchronized ones first.
If only a single call of a method is atomic, it really only solves very simple tasks. Usually you want that a whole bunch of operations on a list/map is executed as one atomic block. This can and should be done using external synchronization, IMHO.
Once you implemented the non-synchronized ones, you can implement the synchronized ones by delegation.