Package com.uc4.api.objects
Class VariableValues
- java.lang.Object
-
- com.uc4.api.objects.VariableValues
-
public final class VariableValues extends java.lang.ObjectThis class represents the "Variables" tab of a STATIC and XML VARA object.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVariableValues(com.uc4.util.XMLDocument doc, boolean xml)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String validityKeyword, java.lang.String[] value, boolean replace)Adds a new key and values to the variables.voidadd(java.lang.String validityKeyword, java.lang.String value, boolean replace)Adds a new key and value to the variables.protected java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String[]>>entryIterator()java.lang.Stringget(java.lang.String validityKeyword)Returns the value for a given key The method returnsnullif the key does not exist.java.lang.String[]getRow(java.lang.String key)Returns the values of a row with the specified key.java.util.Iterator<java.lang.String>keyIterator()Returns an iterator over validity keywords.booleanremove(java.lang.String validityKeyword)Removes a variable entry The method returnsfalseif the validity keyword was not found.voidremoveAll()Removes all entries from the Variable.intsize()protected voidstore(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement)
-
-
-
Method Detail
-
keyIterator
public java.util.Iterator<java.lang.String> keyIterator()
Returns an iterator over validity keywords. All validity keywords have the typejava.lang.String- Returns:
- Iterator
-
add
public void add(java.lang.String validityKeyword, java.lang.String value, boolean replace)Adds a new key and value to the variables. The parameterreplacecan be used to define if the value should be replaced in case of an already existing validity keyword.- Parameters:
validityKeyword- Keyvalue- Valuereplace- If true the value will be replaced if a key with this name does already exist
-
add
public void add(java.lang.String validityKeyword, java.lang.String[] value, boolean replace)Adds a new key and values to the variables. The parameterreplacecan be used to define if the values should be replaced in case of an already existing validity keyword.- Parameters:
validityKeyword- Keyvalue- Array of five elementsreplace- If true the value will be replaced if a key with this name does already exist
-
get
public java.lang.String get(java.lang.String validityKeyword)
Returns the value for a given key The method returnsnullif the key does not exist.- Parameters:
validityKeyword- Key- Returns:
- Value or null if the key does not exist
-
getRow
public java.lang.String[] getRow(java.lang.String key)
Returns the values of a row with the specified key.- Parameters:
key- Name of the key- Returns:
- Array of Strings containing the values
-
entryIterator
protected java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.String[]>> entryIterator()
-
remove
public boolean remove(java.lang.String validityKeyword)
Removes a variable entry The method returnsfalseif the validity keyword was not found.- Parameters:
validityKeyword- Key- Returns:
- True if the values was removed
-
size
public int size()
- Returns:
- Number of entries in the Variable.
-
removeAll
public void removeAll()
Removes all entries from the Variable.
-
store
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement)
-
-