Java Associative Arrays (Sort Of)
Submitted by admin on Sat, 09/12/2015 - 2:29pmEver wish that Java had associative arrays (aka assoc arrays) like in PHP? As in, $x["name"] = "Bill" ? Well, I created a helper class for Java which comes close to approximating it. It can even loop through it similar to foreach().
I call the class PseudoAssocArray, because it actually uses a HashMap to do the behind the scenes work.
Click here to download the source file (CC BY 3.0 "Open Source" license)
Simply download and import the file in your project, then use it like so: