Category Archives: Collections

When a LinkedList is not good enough – OR – copying a Set to a List

I had a need to remove duplicates from a pre-existing list. I tried: Seems easy enough, but the list kept returning no elements. I started clicking through the code and found the LinkedList constructor that takes a collection eventually calls … Continue reading

Posted in Collections, Java | Tagged , , , , , , , , | Leave a comment

Parsing Strings to/from Joda-Time

To parse a string into a DateTime object: To output the formatted value of a DateTime object as a String:

Posted in Collections, Java, Joda-Time | Leave a comment