| java.lang.Object org.jibx.binding.util.StringArray
StringArray | public class StringArray (Code) | | Wrapper for arrays of ordered strings. This verifies the arrays and supports
efficient lookups.
author: Dennis M. Sosnoski |
Constructor Summary | |
public | StringArray(String[] list) Constructor from array of values. | public | StringArray(String[] list, StringArray base) Constructor from array of values to be added to base instance. | public | StringArray(StringArray array1, StringArray array2) Constructor from pair of base instances. | public | StringArray(String[] list, StringArray array1, StringArray array2) Constructor from array of values to be added to pair of base instances. | public | StringArray(String[] list, StringArray array1, StringArray array2, StringArray array3) Constructor from array of values to be added to three base instances. | public | StringArray(String[] list, StringArray array1, StringArray array2, StringArray array3, StringArray array4) Constructor from array of values to be added to four base instances. |
Method Summary | |
public String | get(int index) Get string at a particular index in the list. | public int | indexOf(String value) Find index of a particular string in the array. | public int | size() |
StringArray | public StringArray(String[] list)(Code) | | Constructor from array of values. This checks the array values to make
sure they're ordered and unique, and if they're not throws an exception.
Once the array has been passed to this constructor it must not be
modified by outside code.
Parameters: list - array of values |
StringArray | public StringArray(String[] list, StringArray base)(Code) | | Constructor from array of values to be added to base instance. This
merges the array values, making sure they're ordered and unique, and if
they're not throws an exception.
Parameters: list - array of values Parameters: base - base instance |
StringArray | public StringArray(StringArray array1, StringArray array2)(Code) | | Constructor from pair of base instances. This merges the values, making
sure they're unique, and if they're not throws an exception.
Parameters: array1 - first base array Parameters: array2 - second base array |
StringArray | public StringArray(String[] list, StringArray array1, StringArray array2)(Code) | | Constructor from array of values to be added to pair of base instances.
This merges the array values, making sure they're ordered and unique, and
if they're not throws an exception.
Parameters: list - array of values Parameters: array1 - first base array Parameters: array2 - second base array |
StringArray | public StringArray(String[] list, StringArray array1, StringArray array2, StringArray array3)(Code) | | Constructor from array of values to be added to three base instances.
This merges the array values, making sure they're ordered and unique, and
if they're not throws an exception.
Parameters: list - array of values Parameters: array1 - first base array Parameters: array2 - second base array Parameters: array3 - third base array |
StringArray | public StringArray(String[] list, StringArray array1, StringArray array2, StringArray array3, StringArray array4)(Code) | | Constructor from array of values to be added to four base instances.
This merges the array values, making sure they're ordered and unique, and
if they're not throws an exception.
Parameters: list - array of values Parameters: array1 - first base array Parameters: array2 - second base array Parameters: array3 - third base array Parameters: array4 - fourth base array |
get | public String get(int index)(Code) | | Get string at a particular index in the list.
Parameters: index - list index to be returned string at that index position |
indexOf | public int indexOf(String value)(Code) | | Find index of a particular string in the array. This does
a binary search through the array values, using a pair of
index bounds to track the subarray of possible matches at
each iteration.
Parameters: value - string to be found in list index of string in array, or -1 ifnot present |
size | public int size()(Code) | | Get number of values in array
number of values in array |
|
|