|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectigpp.util.VariableList
public class VariableList
VariableList manages one or more PPIVariable object.
Field Summary | |
---|---|
ArrayList |
mVariable
The list of elements in the label |
Constructor Summary | |
---|---|
VariableList()
Creates an instance of a variable. |
Method Summary | |
---|---|
void |
clear()
Removes all variables from list. |
void |
dump()
Prints out all variables in the variable list. |
boolean |
findAndSet(String name,
String value)
Finds an item in an array list and set its value. |
boolean |
findAndSet(String name,
String value,
boolean resolve)
Finds an item in an array list and set its value. |
boolean |
findAndSet(Variable variable)
Finds a variable in the variable list and set its value. |
boolean |
findAndSet(VariableList list)
Finds eavery variable in a list and sets it in this list. |
boolean |
getBooleanValue(String name)
Finds an item in a variable list and returns its value as an boolean. |
int |
getIntValue(String name)
Finds an item in a variable list and returns its value as an integer. |
String |
getValue(String name)
Finds a variable in the variable list and returns its value. |
String |
getValue(String name,
boolean blank)
Finds a variable in the variable list and returns its value. |
Iterator |
iterator()
Returns an Iterator for the variables in the list. |
String |
replaceVariable(String buffer)
Searches the passed string for variables and replaces each variable with its current value. |
String |
replaceVariable(String buffer,
boolean plain)
Searches the passed string for variables and replaces each variable with its current value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public ArrayList mVariable
Constructor Detail |
---|
public VariableList()
Method Detail |
---|
public void clear()
public boolean findAndSet(Variable variable)
variable
- the name of the variable to set.
true
if an variable was set or added;
false
if unable to add the variable.public boolean findAndSet(VariableList list)
list
- the PPIVariableList of variables to add.
true
if an variable was set or added;
false
if unable to add the variable.public boolean findAndSet(String name, String value)
name
- the name of the variable to set.value
- the value to set for the variable.
true
if an variable was set or added;
false
if unable to add the variable.public boolean findAndSet(String name, String value, boolean resolve)
name
- the name of the variable to set.value
- the value to set for the variable.resolve
- a flag indicating whether to resolve variables in the
value.
true
if an variable was set or added;
false
if unable to add the variable.public String getValue(String name)
name
- the name of the variable to set.
null
if an variable does not exist;
the value assigned to the variable if it does.public String getValue(String name, boolean blank)
name
- the name of the variable to set.blank
- indicates whether to return a blank string if not
the variable is not found. If true
a
blank is returned.
null
if a variable does not exist and
blank
is false
. Returns a blank string
if blank
is true;
the value assigned to the variable if it does.public int getIntValue(String name)
name
- the name of the variable to set.
public boolean getBooleanValue(String name)
name
- the name of the variable to set.
public String replaceVariable(String buffer)
buffer
- the string to search for variables.
public String replaceVariable(String buffer, boolean plain)
buffer
- the string to search for variables.plain
- indicates whether the replaced value of a vaiable should be
enclosed in quotation marks. If true, the value will be unadorned.
public Iterator iterator()
public void dump()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |