Enumeration Classes
 
In Creo Object TOOLKIT Java, enumeration classes are used in the same way that an enum is used in C or C++. An enumeration class defines a limited number of static final instances which correspond to the members of the enumeration. Each static final instance has a corresponding static final integer constant. In the FeatureType enumeration class the static instance FEATTYPE_HOLE has as it’s integer equivalent _FEATTYPE_HOLE . Enumeration classes in Creo Object TOOLKIT Java generally have names of the form XYZType or XYZStatus.
Enumeration instances are passes whenever a method requires you to choose among multiple options. Use the integer constants where an int is required (such as cases in a switch statement).
Was this helpful?