My attempt to simply 'Extend' the Map class fails because List is an interface and cannot be extended but must be implemented.
The goal was simply to add a few methods on top of some existing class such as:
List.add_unique(item) where I only want to append if the item does not already exist. This can be done nicely by and-ing the append !=null logic with List.indexOf(item) != -1 (where -1 is notFound). This would be a good and easy to understand example?
But, how to accomplish this in the shortest, least overall overhead sort of way? I think I would be OK with loose typing - at least to start with.
There are other methods I wish to add and or modify such as an .add() method for the Map class.
I have not dealt with interfaces for many years and I'm thinking there might just be a much easier way overall to get started on this side of my project.
Thanks!