com.sun.n1.util.enumx
Interface EnumFactoryX

All Superinterfaces:
EnumFactory
All Known Implementing Classes:
AppType.Factory, ComparisonType.Factory, ConnectionType.Factory, CriteriaShorthand.Factory, EntityType.Factory, EnumFactoryXImpl, 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 interface EnumFactoryX
extends EnumFactory

The EnumFactoryX allows a client to lookup all values defined for a particular EnumX subclass, and also lookup a particular value by its int or String value. By convention, each strongly-typed enum subclass declares an EnumFactory constant named "FACTORY" that can be used to lookup the enums defined by that class. Note that the getEnum* methods inherited from EnumFactory are deprecated and will not be supported in the next release. The methods getEnumX(String), getEnumX(int) and getAllEnumXs(EnumX[]) must be used instead of getEnum methods.


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 interface com.sun.n1.util.enum.EnumFactory
getAllEnums, getEnum, getEnum
 

Method Detail

getEnumX

EnumX getEnumX(java.lang.String value)
               throws NoSuchEnumExceptionX
Returns the EnumX associated with the passed String value. If no such EnumX exists, an exception is raised.

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

EnumX getEnumX(int value)
               throws NoSuchEnumExceptionX
Returns the EnumX associated with the passed int value. If no such EnumX exists, and exception is raised.

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

EnumX[] getAllEnumXs(EnumX[] container)
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.

Returns:
an array of all EnumXs.