Name: jl125535 Date: 07/27/2004
A DESCRIPTION OF THE REQUEST :
I want a new interface, SimpleMap, and that java.util.Map
is retrofitted to implement this new interface. I think SimpleMap should
only contain two methods: get and containsKey.
In some cases I feel the need for a simple standardized read-only
interface for a map, and java.util.Map is really too complex
(even if you exclude the "optional" methods).
CUSTOMER SUBMITTED WORKAROUND :
* Implement the existing java.utl.Map interface and leave most methods inimplemented, throwing java.lang.UnsupportedOperationException. However, doing so for methods not marked as "optional" violates the contract for the java.util.Map interface.
* Create your own SimpleMap interface. However, this causes more work with wrapper classes since you cannot use an java.util.Map as a SimpleMap.
(Incident Review ID: 229714)