|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Number
|
+--gov.sns.tools.ArrayValue
ArrayStore is the base class of a class cluster which manages the storage of an array of primitive types and String. It includes factory methods to instantiate storage of specific types.
| Field Summary | |
protected java.lang.Object |
array
|
| Constructor Summary | |
|
ArrayValue()
Create a new instatnce of an empty ArrayStore |
protected |
ArrayValue(java.lang.Object anArray)
Creates a new instance of ArrayStore |
| Method Summary | |
static ArrayValue |
arrayValueFromArray(java.lang.Object newArray)
Create a new ArrayValue from an Object array. |
abstract byte[] |
byteArray()
|
static ArrayValue |
byteStore(byte scalar)
Factory method to instantiate a new ArrayValue store for the byte scalar type |
static ArrayValue |
byteStore(byte[] newArray)
Factory method to instantiate a new ArrayValue store for the byte array type |
byte |
byteValue()
get the first element value as a byte |
abstract byte |
byteValueAt(int index)
|
abstract double[] |
doubleArray()
|
static ArrayValue |
doubleStore(double scalar)
Factory method to instantiate a new ArrayValue store for the double scalar type |
static ArrayValue |
doubleStore(double[] newArray)
Factory method to instantiate a new ArrayValue store for the double array type |
double |
doubleValue()
get the first element value as a double |
abstract double |
doubleValueAt(int index)
|
abstract float[] |
floatArray()
|
static ArrayValue |
floatStore(float scalar)
Factory method to instantiate a new ArrayValue store for the float scalar type |
static ArrayValue |
floatStore(float[] newArray)
Factory method to instantiate a new ArrayValue store for the float array type |
float |
floatValue()
get the first element value as a float |
abstract float |
floatValueAt(int index)
|
int |
getCount()
get the length of the array |
java.lang.Class |
getType()
get the native type of the array |
abstract int[] |
intArray()
|
static ArrayValue |
intStore(int scalar)
Factory method to instantiate a new ArrayValue store for the int scalar type |
static ArrayValue |
intStore(int[] newArray)
Factory method to instantiate a new ArrayValue store for the int array type |
int |
intValue()
get the first element value as an int |
abstract int |
intValueAt(int index)
|
abstract long[] |
longArray()
|
long |
longValue()
get the first element value as a long |
abstract long |
longValueAt(int index)
|
static ArrayValue |
numberStore(java.lang.Number number)
Factory method to instantiate a new ArrayValue store from a Number. |
abstract short[] |
shortArray()
|
static ArrayValue |
shortStore(short scalar)
Factory method to instantiate a new ArrayValue store for the short scalar type |
static ArrayValue |
shortStore(short[] newArray)
Factory method to instantiate a new ArrayValue store for the short array type |
short |
shortValue()
get the first element value as a short |
abstract short |
shortValueAt(int index)
|
abstract java.lang.String[] |
stringArray()
|
static ArrayValue |
stringStore(java.lang.String scalar)
Factory method to instantiate a new ArrayValue store for the String scalar type |
static ArrayValue |
stringStore(java.lang.String[] newArray)
Factory method to instantiate a new ArrayValue store for the String array type |
java.lang.String |
stringValue()
get the first element value as a String |
abstract java.lang.String |
stringValueAt(int index)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.Object array
| Constructor Detail |
public ArrayValue()
protected ArrayValue(java.lang.Object anArray)
| Method Detail |
public final int getCount()
public final java.lang.Class getType()
public final byte byteValue()
byteValue in class java.lang.Numberpublic abstract byte byteValueAt(int index)
public abstract byte[] byteArray()
public final short shortValue()
shortValue in class java.lang.Numberpublic abstract short shortValueAt(int index)
public abstract short[] shortArray()
public final int intValue()
intValue in class java.lang.Numberpublic abstract int intValueAt(int index)
public abstract int[] intArray()
public final long longValue()
longValue in class java.lang.Numberpublic abstract long longValueAt(int index)
public abstract long[] longArray()
public final float floatValue()
floatValue in class java.lang.Numberpublic abstract float floatValueAt(int index)
public abstract float[] floatArray()
public final double doubleValue()
doubleValue in class java.lang.Numberpublic abstract double doubleValueAt(int index)
public abstract double[] doubleArray()
public final java.lang.String stringValue()
public abstract java.lang.String stringValueAt(int index)
public abstract java.lang.String[] stringArray()
public static ArrayValue byteStore(byte[] newArray)
public static ArrayValue byteStore(byte scalar)
public static ArrayValue shortStore(short[] newArray)
public static ArrayValue shortStore(short scalar)
public static ArrayValue intStore(int[] newArray)
public static ArrayValue intStore(int scalar)
public static ArrayValue floatStore(float[] newArray)
public static ArrayValue floatStore(float scalar)
public static ArrayValue doubleStore(double[] newArray)
public static ArrayValue doubleStore(double scalar)
public static ArrayValue numberStore(java.lang.Number number)
number - The number to represent.
public static ArrayValue stringStore(java.lang.String[] newArray)
public static ArrayValue stringStore(java.lang.String scalar)
public static ArrayValue arrayValueFromArray(java.lang.Object newArray)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||