|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.stata.sfi.ValueLabel
public final class ValueLabel
Routines for interacting with Stata value labels.
Method Summary | |
---|---|
static int |
createLabel(String name)
Create a new value-label name. |
static String |
getLabel(String name,
int value)
Get the label for a specified value-label value. |
static String[] |
getLabels(String name)
Get the labels for a specified value-label name. |
static String[] |
getNames()
Get the names of all value labels in the current dataset. |
static Map<Integer,String> |
getValueLabels(String name)
Get the values and labels for a specified value-label name. |
static int[] |
getValues(String name)
Get the values associated with a single value-label name. |
static String |
getVarValueLabel(int index)
Get the value-label name associated with a variable. |
static int |
removeLabel(String name)
Remove a value-label name. |
static int |
removeLabelValue(String name,
int value)
Remove a value-label value. |
static int |
removeVarValueLabel(int index)
Remove a value-label name from a variable. |
static int |
setLabelValue(String name,
int value,
String label)
Set a value and label for a value-label name. |
static int |
setVarValueLabel(int index,
String labelName)
Set the value label for a variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String[] getNames()
public static int[] getValues(String name)
getLabels
to obtain two arrays where array indexes are used to lookup each
value label pairing.
name
- The value label name.
public static String[] getLabels(String name)
getValues
to obtain
two arrays where array indexes are used to lookup each value label
pairing.
name
- The name of the value label.
public static Map<Integer,String> getValueLabels(String name)
name
- The name of the value label.
Map
containing the values and
label pairings for the specified value-label name.public static String getLabel(String name, int value)
name
- The name of the value label.value
- The value to lookup.
public static int createLabel(String name)
name
- The new name.
public static int removeLabel(String name)
name
- The name of the value label to remove.
public static int setLabelValue(String name, int value, String label)
name
- The name of the value label.value
- The value.label
- The label.
public static int removeLabelValue(String name, int value)
name
- The name of the value label.value
- The value to remove.
public static String getVarValueLabel(int index)
index
- Index of the variable.
String
is returned. IF an error occurs then a null
String
will be returned.public static int setVarValueLabel(int index, String labelName)
index
- Index of the variable.labelName
- The value-label name.
public static int removeVarValueLabel(int index)
index
- Index of the variable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |