ArrayTool

This is necessary because Velocity does not provide accessors into arrays and some of the API calls will return SoapNamedValues objects that have two matching arrays of name and value.

length(Object[] array)

Get the length of the array.

array
The array being examined.

Returns: The length of the array (null array will return 0).

get(Object[] array, int index)

Get the object at the specified index of the array.

array
The array that contains the object of interest.
index
The index we are pulling the object from.

Returns: The object stored at that array of null if the array is empty or position is invalid.