Package org.xj3d.sai
Class X3DFieldTypeMapper
java.lang.Object
org.xj3d.sai.X3DFieldTypeMapper
A utility class for handling field type functions, Including:
- Associating field type names with their enumerated type constants and vice versa.
- Translating between Xj3D internal FieldConstants types and spec defined X3DFieldTypes.
- Version:
- $Revision: 1.1 $
- Author:
- Rex Melton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic X3DFieldTypeMapper
Return the instance of the X3DFieldTypeMappergetTypeName
(int type) Return the field name that corresponds to the X3DFieldTypes constant.int
getX3DFieldType
(int internalType) Return the X3DFieldTypes constant that corresponds to the FieldConstants type.int
getX3DFieldType
(String typeName) Return the X3DFieldTypes constant that corresponds to the field node type name.
-
Constructor Details
-
X3DFieldTypeMapper
protected X3DFieldTypeMapper()Protected Constructor
-
-
Method Details
-
getInstance
Return the instance of the X3DFieldTypeMapper- Returns:
- the instance of the X3DFieldTypeMapper
-
getTypeName
Return the field name that corresponds to the X3DFieldTypes constant.- Parameters:
type
- The X3DFieldTypes constant- Returns:
- The field type name. If the constant does not correspond to a known type, null is returned.
-
getX3DFieldType
Return the X3DFieldTypes constant that corresponds to the field node type name.- Parameters:
typeName
- The field type name.- Returns:
- the X3DFieldTypes constant that corresponds to the named field type. If the named field type is unknown, -1 is returned.
-
getX3DFieldType
public int getX3DFieldType(int internalType) Return the X3DFieldTypes constant that corresponds to the FieldConstants type.- Parameters:
internalType
- The FieldConstants type.- Returns:
- the X3DFieldTypes constant that corresponds. If the field type is unknown, -1 is returned.
-