Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

Class SimpsonsAndBouvierFamilySequence.Instance

  extended by dk.rode.thesis.singleton.SimpsonsAndBouvierFamilySequence.Instance
Enclosing class:

private static final class SimpsonsAndBouvierFamilySequence.Instance
extends Object

An instance container class that when loaded will create the SimpsonsAndBouvierFamilySequence instance to use and return from the SimpsonsAndBouvierFamilySequence.getFamily() method.

The initialisation of the sequence is thread-safe as it utilises standard static initialisation.

Implementation notes:
This corresponds to the initialise-on-demand holder class idiom described in [Bloch01, p.194].

Gunni Rode / rode.dk

Field Summary
private static SimpsonsAndBouvierFamilySequence instance
          The singleton instance.
Constructor Summary
private SimpsonsAndBouvierFamilySequence.Instance()
          Private off-limit constructor.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


private static final SimpsonsAndBouvierFamilySequence instance
The singleton instance.

Not created until the SimpsonsAndBouvierFamilySequence.getFamily() method is invoked.

Constructor Detail


private SimpsonsAndBouvierFamilySequence.Instance()
Private off-limit constructor.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.