public class VarDisplay extends java.lang.Object implements VarInterface
Modifier and Type | Field and Description |
---|---|
private static java.util.regex.Pattern |
datefmt
Private member that defines regular expression to match any of the
basic Date/DateTime formats in Stata
|
private java.lang.String |
name
A name property for the object
|
private java.util.Map<java.lang.String,java.lang.String> |
varTypes
Member variable containing indicators for whether or not the variable
is of type String
|
Constructor and Description |
---|
VarDisplay(VariableIndex varIndex)
Class constructor for variable display formats
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Boolean> |
areDate()
Returns a List of Booleans indicating whether or not the variable is a
date/datetime type
|
java.util.Iterator |
getIterator()
Method used to return the appropriate iterator needed to iterate over the
values stored in the object.
|
java.lang.String |
getName()
Method to retrieve the name of the JSON object
|
java.lang.String |
getValue(java.lang.String varnm)
Method to access the format type for a variable
|
java.util.Map<java.lang.String,java.lang.String> |
getValues() |
java.lang.Boolean |
isDate(java.lang.String varnm)
Method to check if a specific variable includes the letter t
(indicating a date/datetime format)
|
private static final java.util.regex.Pattern datefmt
private final java.lang.String name
private java.util.Map<java.lang.String,java.lang.String> varTypes
public VarDisplay(VariableIndex varIndex)
varIndex
- The variable index object defining the variables to
look up.public java.util.Map<java.lang.String,java.lang.String> getValues()
public java.lang.String getValue(java.lang.String varnm)
varnm
- The variable index whose format to look uppublic java.lang.String getName()
public java.util.Iterator getIterator()
getIterator
in interface VarInterface
public java.lang.Boolean isDate(java.lang.String varnm)
varnm
- The variable index value to look uppublic java.util.List<java.lang.Boolean> areDate()