public final class ValueLabel extends Object
Modifier and Type | Method and Description |
---|---|
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.
|
public static int createLabel(String name)
name
- The new name.public static String getLabel(String name, int value)
name
- The name of the value label.value
- The value to look up.public static String[] getLabels(String name)
getValues
to obtain
two arrays, where array indexes are used to look up each value-label
pairing.name
- The name of the value label.public static String[] getNames()
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 int[] getValues(String name)
getLabels
to obtain two arrays, where array indexes are used to look up each
value-label pairing.name
- The value label name.public static String getVarValueLabel(int index)
public static int removeLabel(String name)
name
- The name of the value label to remove.public static int removeLabelValue(String name, int value)
name
- The name of the value label.value
- The value to remove.public static int removeVarValueLabel(int index)
index
- Index of the variable.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 setVarValueLabel(int index, String labelName)
index
- Index of the variable.labelName
- The value-label name.