A simple
Map.Entry
implementation that can be used as in input parameter. Since a
MapEntryParameter
is not obtained from a map, it is not attached to any map in particular. To emphasize that changing this object does not change the map, the {@link #setValue} methodalways throws
UnsupportedOperationException
.
Warning: Use of this interface violates the Java Collections interface contract since these state that Map.Entry
objects should only be obtained from Map.entrySet()
sets, while this class allows constructing them directly. However, it is useful for performing operations on an entry set such as add(), contains(), etc. For restrictions see {@link #getValue} and {@link #setValue}.
@author Mark Hayes