commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil O'Toole <>
Subject [collections] submission: KeyValueRecord
Date Sat, 20 Sep 2003 22:06:56 GMT
Attached is source (& associated tests) for
KeyValueRecord is an immutable {key, value, previous-value} triplet, a
simple but very useful data structure. It's particularly of use with
Map (and Map.Entry) for storing, tracking, and comparing entry state,
but can obviously be used for any key-value data. The constructors
include one to create a KeyValueRecord from a Map.Entry. There is also
a method to view the KeyValueRecord as a Map.Entry (#asMapEntry). See
the javadoc for more details.

** I had a swift look through [collections] and [lang], and didn't see
a simple KeyValuePair implementation... Have I missed this somewhere?
If not, I have an implementation which I will post.



View raw message