|
HATS 7.5.1 Web API ReferencePublicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.hats.common.GlobalVariable
public class GlobalVariable
A HATS Global Variable is an object which can be the target of SetAction, ExtractAction, etc... The default implementation is a list of strings. Many of the methods are pass-through to the backing java.util.List object
| Field Summary | |
|---|---|
protected List |
list
The contents of this global variable |
| Fields inherited from interface com.ibm.hats.common.IGlobalVariable |
|---|
COPYRIGHT, OPERATOR_CONCAT, OPERATOR_DIVIDE, OPERATOR_ERROR, OPERATOR_MINUS, OPERATOR_MODULUS, OPERATOR_MULTIPLY, OPERATOR_NOP, OPERATOR_PLUS |
| Constructor Summary | |
|---|---|
GlobalVariable(String name)
Constructs a global variable with the specified name |
|
GlobalVariable(String name,
Object obj)
Constructs a global variable with the specified name and initial value |
|
GlobalVariable(String name,
String[] strings)
Constructs a global variable with the specified name and initial value |
|
| Method Summary | |
|---|---|
void |
add(int i,
Object obj)
Inserts one element into this global variable at the specified position |
void |
add(int i,
String[] strings)
Inserts the given strings into this global variable at the specified position |
void |
add(Object obj)
Appends the given element to the end of this global variable |
void |
add(String[] strings)
Appends the given strings as elements to the end of this global variable |
IGlobalVariable |
calculate(int gvOperator,
int myIndex,
IGlobalVariable otherVariable,
int otherIndex,
int decimalRounding)
Perform an operation on another global variable, and return the result. |
void |
clear()
Removes all of the elements of this global variable |
boolean |
equals(Object obj)
Compares the specified object with the list for equality |
Object |
get()
Gets this entire global variable as an object. |
Object |
get(int i)
Gets the element of this global variable at the specified position as an object. |
Collection |
getAll()
Gets this entire global variable as a collection of objects. |
String |
getName()
Returns this global variable's name |
String |
getString()
Gets this global variable as a single string. |
String |
getString(int i)
Gets one element of this global variable as a single string. |
String |
getString(String separator)
Gets all elements of this global variable as a single string, using the provided separator string to separate the elements in the returned string. |
boolean |
isEmpty()
Returns true if this global variable has no contents |
void |
set(IGlobalVariable gv)
Copies the values of the specified global variable into this one |
void |
set(int i,
Object obj)
Replaces the element of this global variable at the specified position with the given element |
void |
set(int i,
String[] strings)
Replaces the elements of this global variable starting the specified position with the given strings |
void |
set(Object obj)
Replaces this entire global variable with the given element |
void |
set(String[] strings)
Replaces this entire global variable with the given strings as elements |
void |
setList(ArrayList arrayList)
Replaces the elements of this global variable with the elements in the given list. |
void |
setName(String name)
Sets this global variable's name |
int |
size()
Returns the number of elements in this global variable |
String |
toString()
Returns this global variable as a string, for debugging purposes |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List list
| Constructor Detail |
|---|
public GlobalVariable(String name)
public GlobalVariable(String name,
Object obj)
public GlobalVariable(String name,
String[] strings)
| Method Detail |
|---|
public void setName(String name)
setName in interface IGlobalVariablepublic String getName()
getName in interface IGlobalVariablepublic void add(String[] strings)
IGlobalVariable
add in interface IGlobalVariable
public void add(int i,
String[] strings)
throws IndexOutOfBoundsException
IGlobalVariable
add in interface IGlobalVariableIndexOutOfBoundsExceptionpublic void add(Object obj)
IGlobalVariable
add in interface IGlobalVariable
public void add(int i,
Object obj)
throws IndexOutOfBoundsException
IGlobalVariable
add in interface IGlobalVariableIndexOutOfBoundsExceptionpublic void set(IGlobalVariable gv)
IGlobalVariable
set in interface IGlobalVariablepublic void set(String[] strings)
IGlobalVariable
set in interface IGlobalVariablepublic void set(Object obj)
IGlobalVariable
set in interface IGlobalVariablepublic void setList(ArrayList arrayList)
arrayList - List of elements to put in global variable
public void set(int i,
String[] strings)
throws IndexOutOfBoundsException
IGlobalVariable
set in interface IGlobalVariableIndexOutOfBoundsException
public void set(int i,
Object obj)
throws IndexOutOfBoundsException
IGlobalVariable
set in interface IGlobalVariableIndexOutOfBoundsExceptionpublic void clear()
IGlobalVariable
clear in interface IGlobalVariablepublic boolean equals(Object obj)
IGlobalVariable
equals in interface IGlobalVariableequals in class Objectpublic boolean isEmpty()
IGlobalVariable
isEmpty in interface IGlobalVariablepublic int size()
IGlobalVariable
size in interface IGlobalVariablepublic String getString()
IGlobalVariable
getString in interface IGlobalVariablepublic String getString(String separator)
IGlobalVariable
getString in interface IGlobalVariable
public String getString(int i)
throws IndexOutOfBoundsException
IGlobalVariable
getString in interface IGlobalVariableIndexOutOfBoundsExceptionpublic Object get()
IGlobalVariable
get in interface IGlobalVariable
public Object get(int i)
throws IndexOutOfBoundsException
IGlobalVariable
get in interface IGlobalVariableIndexOutOfBoundsExceptionpublic Collection getAll()
IGlobalVariable
getAll in interface IGlobalVariable
public IGlobalVariable calculate(int gvOperator,
int myIndex,
IGlobalVariable otherVariable,
int otherIndex,
int decimalRounding)
throws NumberFormatException,
IllegalArgumentException
calculate in interface IGlobalVariablegvOperator - Global variable operation to perform.myIndex - Index of value in this global variable to use.otherVariable - Global variable to perform operation upon.otherIndex - Index of value in gv2 to use.decimalRounding - Number of decimal places to display, or -1 for no rounding.
NumberFormatException
IllegalArgumentExceptionpublic String toString()
toString in class Object
|
HATS 7.5.1 (201005110649) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||