HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.common
Interface IGlobalVariable

All Known Implementing Classes:
GlobalVariable

public interface IGlobalVariable

A Global Variable is an object which can be the target of SetAction, ExtractAction, etc... The default implementation is a list of strings. The interface is very similar to java.util.List.

See Also:
List

Field Summary
static String COPYRIGHT
          The HsrCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.
static int OPERATOR_CONCAT
          Global variable concatenation operator
static int OPERATOR_DIVIDE
          Global variable division operator
static int OPERATOR_ERROR
          Global variable error operator
static int OPERATOR_MINUS
          Global variable subtraction operator
static int OPERATOR_MODULUS
          Global variable modulus operator
static int OPERATOR_MULTIPLY
          Global variable multiplication operator
static int OPERATOR_NOP
          Global variable empty operator
static int OPERATOR_PLUS
          Global variable addition operator
 
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 i, IGlobalVariable gv2, int i2, 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 the name of this global variable
 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 setName(String name)
          Sets the name of this global variable
 int size()
          Returns the number of elements in this global variable
 

Field Detail

COPYRIGHT

static final String COPYRIGHT
The HsrCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.

See Also:
Constant Field Values

OPERATOR_ERROR

static final int OPERATOR_ERROR
Global variable error operator

See Also:
Constant Field Values

OPERATOR_NOP

static final int OPERATOR_NOP
Global variable empty operator

See Also:
Constant Field Values

OPERATOR_PLUS

static final int OPERATOR_PLUS
Global variable addition operator

See Also:
Constant Field Values

OPERATOR_MINUS

static final int OPERATOR_MINUS
Global variable subtraction operator

See Also:
Constant Field Values

OPERATOR_MULTIPLY

static final int OPERATOR_MULTIPLY
Global variable multiplication operator

See Also:
Constant Field Values

OPERATOR_DIVIDE

static final int OPERATOR_DIVIDE
Global variable division operator

See Also:
Constant Field Values

OPERATOR_CONCAT

static final int OPERATOR_CONCAT
Global variable concatenation operator

See Also:
Constant Field Values

OPERATOR_MODULUS

static final int OPERATOR_MODULUS
Global variable modulus operator

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the name of this global variable


setName

void setName(String name)
Sets the name of this global variable


add

void add(String[] strings)
Appends the given strings as elements to the end of this global variable


add

void add(int i,
         String[] strings)
         throws IndexOutOfBoundsException
Inserts the given strings into this global variable at the specified position

Throws:
IndexOutOfBoundsException

add

void add(Object obj)
Appends the given element to the end of this global variable


add

void add(int i,
         Object obj)
         throws IndexOutOfBoundsException
Inserts one element into this global variable at the specified position

Throws:
IndexOutOfBoundsException

set

void set(IGlobalVariable gv)
Copies the values of the specified global variable into this one


set

void set(String[] strings)
Replaces this entire global variable with the given strings as elements


set

void set(Object obj)
Replaces this entire global variable with the given element


set

void set(int i,
         String[] strings)
         throws IndexOutOfBoundsException
Replaces the elements of this global variable starting the specified position with the given strings

Throws:
IndexOutOfBoundsException

set

void set(int i,
         Object obj)
         throws IndexOutOfBoundsException
Replaces the element of this global variable at the specified position with the given element

Throws:
IndexOutOfBoundsException

clear

void clear()
Removes all of the elements of this global variable


equals

boolean equals(Object obj)
Compares the specified object with the list for equality

Overrides:
equals in class Object

isEmpty

boolean isEmpty()
Returns true if this global variable has no contents


size

int size()
Returns the number of elements in this global variable


getString

String getString()
Gets this global variable as a single string. This is a convenience method because strings are required for inserting into host screens. It is up to the implementation how to respond to this method; either just the first element, or some combination of all elements can be returned.


getString

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. No attempt is made to "escape" the separator if it appears within the global variable elements themselves.


getString

String getString(int i)
                 throws IndexOutOfBoundsException
Gets one element of this global variable as a single string. This is a convenience method because strings are required for inserting into host screens.

Throws:
IndexOutOfBoundsException

get

Object get()
Gets this entire global variable as an object. It is up to the implementation how to respond to this method; either just the first element, or some combination of all elements can be returned.


getAll

Collection getAll()
Gets this entire global variable as a collection of objects. The return type must be one of the Java Collection types. It is up to the implementation how to respond to this method, the standard indexed global variable returns its list.


get

Object get(int i)
           throws IndexOutOfBoundsException
Gets the element of this global variable at the specified position as an object.

Throws:
IndexOutOfBoundsException

calculate

IGlobalVariable calculate(int gvOperator,
                          int i,
                          IGlobalVariable gv2,
                          int i2,
                          int decimalRounding)
                          throws IndexOutOfBoundsException,
                                 NumberFormatException,
                                 IllegalArgumentException
Perform an operation on another global variable, and return the result

Throws:
IndexOutOfBoundsException
NumberFormatException
IllegalArgumentException

HATS 7.5.1 (201005110649)