public class StataTypes extends java.lang.Object implements StataTypeInterface
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.lang.String> |
typeClassMap
Member used to store the class types of the data so the values can be
recast using reflection methods
|
private static java.util.Map<java.lang.String,java.lang.Integer> |
typeMap
Member used to map string values returned by the `: type [varname]'
extended macro function to integer values used in the .dta
specification to represent the data types.
|
Constructor and Description |
---|
StataTypes()
Class constructor for the StataTypes class.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getClassType(java.lang.String type)
Like the getType method of this class, this method is used to look up
variable type definitions for a valued retrieved from `: type [varnm]'
.
|
static java.lang.Integer |
getType(java.lang.String type)
Method to translate a value from `: type [varname]' into an integer
value corresponding to the data type based on the .dta file
specification.
|
private static void |
setMaps()
Method used to construct the Map object used to look up values and
return the appropriate type integer
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStataType
private static java.util.Map<java.lang.String,java.lang.Integer> typeMap
private static java.util.Map<java.lang.String,java.lang.String> typeClassMap
StataTypes()
public static java.lang.Integer getType(java.lang.String type)
type
- A string returned from the `: type ' extended macro
function (e.g., byte, int, long, float, double, str#,
strL)public static java.lang.String getClassType(java.lang.String type)
type
- A string returned from the `: type ' extended macro
function (e.g., byte, int, long, float, double, str#,
strL)private static void setMaps()