ExtendedSingletonpublic class ExtendedSingleton extends Singleton A demonstration of an extensible extention of the Singleton class. |
Fields Summary |
---|
private static final int | DEFAULT_VALUEThe default for the value property. | private final int | valuesome value_ |
Constructors Summary |
---|
protected ExtendedSingleton(String[] params, int value)Creates a new ExtendedSingleton object.
super(params);
this.value = value;
|
Methods Summary |
---|
public static void | init(java.lang.String[] params)An initializer for our demo singleton that uses the default value.
instance = new ExtendedSingleton(params, DEFAULT_VALUE);
| public static void | init(java.lang.String[] params, int value)An initializer for our demo singleton that uses the custom value.
instance = new ExtendedSingleton(params, value);
| protected void | supress()Used just to supress eclipse warnings of unused local variables; irrelevant to the
example.
new Integer(this.value);
|
|