public class IntegerArray
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int[] |
array |
static int |
ArrayIndexOutOfBoundsError |
protected int[] |
defaultArray |
protected java.lang.String |
defaultString |
protected int |
errorcode |
static int |
NumberFormatError |
Constructor and Description |
---|
IntegerArray(int n)
Creates a DoubleArray of the given length with all elements set to zero.
|
IntegerArray(int[] array)
Creates a DoubleArray of the given length with all elements set to zero.
|
IntegerArray(java.lang.String str)
Creates an arry with the given string being the default string.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getArray()
Gets the array of doubles.
|
int[] |
getArray(java.lang.String str)
Converts the string to an array and returns the array.
|
java.lang.String |
getDefault()
Gets the default array.
|
int |
getError()
Gets the error code
|
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load object data.
|
boolean |
set(java.lang.String str)
Sets the array to the given string.
|
void |
setDefaultArray(int[] array) |
protected int[] |
toInteger(java.lang.String str)
Converts a comma delimited string enclosed in braces to an array.
|
java.lang.String |
toString()
Converts the array to a comma delimited string enclosed in braces.
|
public static int NumberFormatError
public static int ArrayIndexOutOfBoundsError
protected int[] array
protected java.lang.String defaultString
protected int[] defaultArray
protected int errorcode
public IntegerArray(int n)
n
- public IntegerArray(int[] array)
array
- public IntegerArray(java.lang.String str) throws java.lang.NumberFormatException
str
- java.lang.NumberFormatException
public java.lang.String getDefault()
public java.lang.String toString()
toString
in class java.lang.Object
public int getError()
public int[] getArray(java.lang.String str)
public int[] getArray()
public boolean set(java.lang.String str)
public void setDefaultArray(int[] array)
protected int[] toInteger(java.lang.String str) throws java.lang.ArrayIndexOutOfBoundsException
str
- java.lang.ArrayIndexOutOfBoundsException
public static XML.ObjectLoader getLoader()