Thanks Andrew! I appreciate your explanation and that pattern makes sense to me. However, I don¹t think it is necessary for the option classes that I am updating right now.
/jd On 5/21/14, 12:25 PM, "Andrew Phillips" <aphill...@qrmedia.com> wrote: >> Many of the option classes in jclouds have a "NONE² field that >> cleverly creates a default instance of the class containing no >> options. Can anyone enlighten me on the history of this pattern and >> why this is necessary? > >My best guess is that this may have been an instance of the Null >Object pattern, so that you can do things like: > >public X list() { > return list(Options.NONE); >} > >and can then implement the version *with* options without having to >check for null options etc. > >ap