ikrs.typesystem
Class BasicArrayType

java.lang.Object
  extended by ikrs.typesystem.BasicTypeAdapter
      extended by ikrs.typesystem.BasicArrayType
All Implemented Interfaces:
BasicType

public class BasicArrayType
extends BasicTypeAdapter
implements BasicType

The BasicArrayType is a not so basic type class with the capability to wrap a set to BasicType instances together into a linear array-like list. All access methods guarantee constant runtime, so the class does not support item removal. THIS CLASS IS STILL EXPERIMENTAL.


Field Summary
 
Fields inherited from interface ikrs.typesystem.BasicType
TYPE_ARRAY, TYPE_BOOLEAN, TYPE_BYTE, TYPE_CHAR, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_SHORT, TYPE_STRING, TYPE_UUID
 
Constructor Summary
BasicArrayType()
           
 
Method Summary
protected  void addArrayElement(BasicType item)
           
 boolean equals(BasicArrayType a)
           
 BasicArrayType getArray()
          The method is more or less for implicit type casting.
 BasicType getArrayElementAt(int index)
           
 int getArraySize()
           
 BasicType[] getObjectArray()
           
protected  BasicType setArrayElementAt(int index, BasicType item)
           
 
Methods inherited from class ikrs.typesystem.BasicTypeAdapter
equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, getArray, getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getString, getString, getType, getUUID, getUUID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ikrs.typesystem.BasicType
equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, equals, getArray, getBoolean, getBoolean, getByte, getByte, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getString, getString, getType, getUUID, getUUID
 

Constructor Detail

BasicArrayType

public BasicArrayType()
Method Detail

getArray

public BasicArrayType getArray()
                        throws BasicTypeException
The method is more or less for implicit type casting. It must return this object itself with the dynamic type 'BasicArrayType'. If this object is NOT a BasicArrayType, it MUST throw a BasicTypeException.

Specified by:
getArray in interface BasicType
Overrides:
getArray in class BasicTypeAdapter
Throws:
BasicTypeException

getArraySize

public int getArraySize()
Specified by:
getArraySize in interface BasicType
Overrides:
getArraySize in class BasicTypeAdapter

getArrayElementAt

public BasicType getArrayElementAt(int index)
                            throws java.lang.ArrayIndexOutOfBoundsException
Specified by:
getArrayElementAt in interface BasicType
Overrides:
getArrayElementAt in class BasicTypeAdapter
Throws:
java.lang.ArrayIndexOutOfBoundsException

setArrayElementAt

protected BasicType setArrayElementAt(int index,
                                      BasicType item)
                               throws BasicTypeException,
                                      java.lang.ArrayIndexOutOfBoundsException
Throws:
BasicTypeException
java.lang.ArrayIndexOutOfBoundsException

addArrayElement

protected void addArrayElement(BasicType item)
                        throws BasicTypeException
Throws:
BasicTypeException

getObjectArray

public BasicType[] getObjectArray()

equals

public boolean equals(BasicArrayType a)
Specified by:
equals in interface BasicType
Overrides:
equals in class BasicTypeAdapter