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

Class SimpsonsFamilySequence.Instance

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

private static final class SimpsonsFamilySequence.Instance
extends Object

An instance container class that when loaded will create the SimpsonsFamilySequence instance to use and return from the SimpsonsFamilySequence.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 SimpsonsFamilySequence instance
          The singleton instance.
Constructor Summary
private SimpsonsFamilySequence.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 SimpsonsFamilySequence instance
The singleton instance.

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

Constructor Detail


private SimpsonsFamilySequence.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.