Package com.uc4.api.objects
Class TaskValues
java.lang.Object
com.uc4.api.objects.TaskValues
This class represents task values and PromptSets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()This method is used to return the copy of the TaskValues Object.getErtUsage(String validityKeyword) Returns theErtUsagevalue for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.intReturns an integer which describes how variable values are inherited from its parent.getParentErtUsage(String validityKeyword) Returns theErtUsagevalue of the parent, for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.getParentValue(String validityKeyword) Returns the parent value for a given validity keyword The method returnsnullif the validity keyword does not exist.Returns the value for a given validity keyword The method returnsnullif the validity keyword does not exist.booleanisValueOverridden(String validityKeyword) Returns if the value for a given validity keyword (variable) was overriddenReturns an iterator over parent validity keywords.intReturns an iterator overPromptSetDefinition.intbooleanreplaceValue(String kw, String value) Replaces an existing value.booleanreplaceValueOnlyIfChanged(String kw, String value) Deprecated.Deprecated, kept only for binary compatibility.Returns an iterator over validity keywords.int
-
Constructor Details
-
TaskValues
-
-
Method Details
-
getInheritFromParent
public int getInheritFromParent()Returns an integer which describes how variable values are inherited from its parent.- 0 ... All values
- 1 ... Defined values only
- 2 ... None
- Returns:
- Inherit mode
-
valueKeyIterator
Returns an iterator over validity keywords. All validity keywords have the typejava.lang.String- Returns:
- Iterator
-
parentValueKeyIterator
Returns an iterator over parent validity keywords. All parent validity keywords have the typejava.lang.String- Returns:
- Iterator
-
replaceValue
Replaces an existing value.- Parameters:
kw- Keyvalue- Value- Returns:
- If true the value will be replaced if a key with this name does already exist
-
replaceValueOnlyIfChanged
Deprecated.Deprecated, kept only for binary compatibility.Replaces an existing value and overrideDefinition if values differ. The semantics of this method have turned out to not make sense - don't use it.- Parameters:
kw- Keyvalue- Value- Returns:
- If true the value and the overrideDefinition will be replaced if a key with this name already exists.
-
valueSize
public int valueSize()- Returns:
- Number of entries in the Variable.
-
parentValueSize
public int parentValueSize()- Returns:
- Number of entries in the parent Variable.
-
promptSetSize
public int promptSetSize()- Returns:
- Number of PromptSet entries
-
promptSetIterator
Returns an iterator overPromptSetDefinition.- Returns:
- Iterator
-
getValue
Returns the value for a given validity keyword The method returnsnullif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Value or null if the key does not exist
-
isValueOverridden
Returns if the value for a given validity keyword (variable) was overridden- Parameters:
validityKeyword- Key- Returns:
- overridden value or false if the key does not exist
-
getParentValue
Returns the parent value for a given validity keyword The method returnsnullif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Parent value or null if the key does not exist
-
getErtUsage
Returns theErtUsagevalue for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Return the
ErtUsageorErtUsage.NONEif the key does not exist
-
getParentErtUsage
Returns theErtUsagevalue of the parent, for a given validity keyword The method returnsErtUsage.NONEif the validity keyword does not exist.- Parameters:
validityKeyword- Key- Returns:
- Return the
ErtUsageorErtUsage.NONEif the key does not exist
-
copy
This method is used to return the copy of the TaskValues Object.- Returns:
- TaskValues
-