CQM CQM - 1 year ago 107
Java Question

java key/value pair object, that isn't an array/map

I want a key value pair object. Just two strings


Object<String, String>

is there an existing object in java to facilitate this before I reinvent the wheel?

The only reason I didn't immediately gravitate to Hash/Map this time is because that one object is made to store multiple key/value pairs. Is there one designed to hold just a single key/value pair, that I can turn into an array if I feel inclined to do so?

Answer Source

You will need to create your own. This is done (AFAIK) to facilitate a better semantic meaning from the class name, than a general Pair<> or KeyValuePair<> would

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download