Added a method to get all objects as a set.

This method complements the [allObjects] conversion to an array.