Package net.sf.jguiraffe.gui.forms
Enum DummyWrapper
- java.lang.Object
-
- java.lang.Enum<DummyWrapper>
-
- net.sf.jguiraffe.gui.forms.DummyWrapper
-
- All Implemented Interfaces:
Serializable
,Comparable<DummyWrapper>
,TransformerWrapper
,ValidatorWrapper
public enum DummyWrapper extends Enum<DummyWrapper> implements TransformerWrapper, ValidatorWrapper
A dummy implementation of the
TransformerWrapper
and theValidatorWrapper
interfaces.This class implements an identity transformation and a validation which always returns valid. It can be used as an application of the null object pattern when no specific transformers or validators are set.
The class is an enumeration because it is not necessary to create instance; the singleton instance can be shared by all components.
- Version:
- $Id$
- Author:
- Oliver Heger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The single instance of this class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DummyWrapper
valueOf(String name)
Returns the enum constant of this type with the specified name.static DummyWrapper[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.sf.jguiraffe.gui.forms.TransformerWrapper
transform
-
Methods inherited from interface net.sf.jguiraffe.gui.forms.ValidatorWrapper
isValid
-
-
-
-
Enum Constant Detail
-
INSTANCE
public static final DummyWrapper INSTANCE
The single instance of this class.
-
-
Method Detail
-
values
public static DummyWrapper[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DummyWrapper c : DummyWrapper.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DummyWrapper valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-