November 19, 2011

XCollections - Use Custom Apex Classes in Map & Set.

Apex currently doesn’t supports User defined Classes/Types(UDT) to be used in Map and Set classes. This is a very hurting limitation in some scenarios.

To overcome this limitation, “XCollections” Apex API project was started few weeks back as an independent project on github. This API as of now has two major classes called XMap and XSet that allows use of UDTs.

Regarding XCollections, I had a discussion with two very respected and well known guys in force.com community( brief intros added below, to help my new force.com peers)

  • Richard Vanhook(Force.com MVP & Tech. Sol Architect @ Salesforce.com)
  •  Joel Dietz(Force.com MVP & Tech Architect @T’quilla Ltd) about XCollections.

We decided that better place for this API is in a sub repository named “collections” under very popular apex-commons framework. So going forward XCollections will be available as “collections” in apex-commons.

Today, I wrapped up long time pending tasks like

  • Code clean up
  • Readme.md in github flavored markdown.
  • Test cases
  • And final push and pull requests for apex-commons :) (waiting for the merge)

You can find complete details about this project and how to use the API here : https://github.com/abhinavguptas/collections

References

Your views and feedback !

Always  appreciate & love to discuss your feedback and views, so looking forward to those :)