com.sun.n1.util.enumx
Class EnumFactoryXImpl

java.lang.Object
  extended by com.sun.n1.util.enum.EnumFactoryImpl
      extended by com.sun.n1.util.enumx.EnumFactoryXImpl
All Implemented Interfaces:
EnumFactory, EnumFactoryX
Direct Known Subclasses:
AppType.Factory, ComparisonType.Factory, ConnectionType.Factory, CriteriaShorthand.Factory, EntityType.Factory, ExecutionMode.Factory, HostStatus.Factory, Level.Factory, Modifier.Factory, NamedBlockType.Factory, OutputType.Factory, RunLevel.Factory, Scope.Factory, Style.Factory, TargetStatusCode.Factory, TaskStatus.Factory, TaskType.Factory, TransformType.Factory, UpgradeNodeState.FACTORY, UpgradeTaskState.FACTORY, Visibility.Factory

public abstract class EnumFactoryXImpl
extends EnumFactoryImpl
implements EnumFactoryX

This class is the base implementation of the Enumumeration types. Its not meant to be used directly, only subclasses should be used. Note that the getEnum* methods inherited from EnumFactoryImpl are deprecated and will not be supported in the next release. The methods getEnumX(String), getEnumX(int) and getAllEnumXs(EnumX[]) must be used instead.


Constructor Summary
protected EnumFactoryXImpl()
          Creates a new instance of EnumFactoryXImpl
protected EnumFactoryXImpl(int expectedSize)
           
 
Method Summary
 EnumX[] getAllEnumXs(EnumX[] container)
          Returns an array of all EnumXs.
 EnumX getEnumX(int value)
          Returns the EnumX associated with the passed int value.
 EnumX getEnumX(java.lang.String value)
          Returns the EnumX associated with the passed String value.
 
Methods inherited from class com.sun.n1.util.enum.EnumFactoryImpl
getAllEnums, getEnum, getEnum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.n1.util.enum.EnumFactory
getAllEnums, getEnum, getEnum
 

Constructor Detail

EnumFactoryXImpl

protected EnumFactoryXImpl()
Creates a new instance of EnumFactoryXImpl


EnumFactoryXImpl

protected EnumFactoryXImpl(int expectedSize)
Method Detail

getEnumX

public EnumX getEnumX(java.lang.String value)
               throws NoSuchEnumExceptionX
Description copied from interface: EnumFactoryX
Returns the EnumX associated with the passed String value. If no such EnumX exists, an exception is raised.

Specified by:
getEnumX in interface EnumFactoryX
Parameters:
value - the string value of the desired EnumX.
Returns:
the EnumX associated with the passed value.
Throws:
NoSuchEnumExceptionX - if no such enum exists.

getEnumX

public EnumX getEnumX(int value)
               throws NoSuchEnumExceptionX
Description copied from interface: EnumFactoryX
Returns the EnumX associated with the passed int value. If no such EnumX exists, and exception is raised.

Specified by:
getEnumX in interface EnumFactoryX
Parameters:
value - the int value of the desired EnumX.
Returns:
the EnumX associated with the passed value.
Throws:
NoSuchEnumExceptionX - if no such enum exists.

getAllEnumXs

public EnumX[] getAllEnumXs(EnumX[] container)
Description copied from interface: EnumFactoryX
Returns an array of all EnumXs. If the passed array is large enough to contain all the EnumXs, it is used. Otherwise, a new array with the same runtime type of the passed array is created and used instead.

Specified by:
getAllEnumXs in interface EnumFactoryX
Returns:
an array of all EnumXs.