com.parabon.common
Class ArrayParameterValue

java.lang.Object
  extended by com.parabon.common.ArrayParameterValue
All Implemented Interfaces:
ParameterValue, com.parabon.util.ObjectPool.Destroyable, com.parabon.util.ObjectPool.Reclaimable, java.io.Externalizable, java.io.Serializable

public class ArrayParameterValue
extends java.lang.Object
implements ParameterValue

Represents an Array type structure that can be used for data communication between the Client API and the Parabon Pioneer via Frontier. The interface is meant to mimick closely the List interface of the Java Collections API.

See Also:
List, Serialized Form

Nested Class Summary
static class ArrayParameterValue.Element
           
protected  class ArrayParameterValue.ElementIterator
           
protected  class ArrayParameterValue.ReferenceElement
           
 
Field Summary
protected  boolean destroyed
           
protected  java.util.List<ParameterValue> elements
           
protected  com.parabon.util.ObjectPool pool
           
 
Constructor Summary
ArrayParameterValue()
           
ArrayParameterValue(int initialCapacity)
           
ArrayParameterValue(int initialCapacity, com.parabon.util.ObjectPool pool_)
           
ArrayParameterValue(com.parabon.util.ObjectPool pool_)
           
 
Method Summary
 void add(boolean value)
          Append a value to the ArrayParameterValue's internal List.
 void add(byte[] value)
          Append a value to the ArrayParameterValue's internal List.
 void add(java.util.Date value)
          Append a value to the ArrayParameterValue's internal List.
 void add(double value)
          Append a value to the ArrayParameterValue's internal List.
 void add(long value)
          Append a value to the ArrayParameterValue's internal List.
 void add(ParameterValue value)
          Append a value to the ArrayParameterValue internal List.
 void add(java.lang.String value)
          Append a value to the ArrayParameterValue's internal List.
 void addElement(ArrayParameterValue.Element value)
           
protected  void addNoCopy(ParameterValue value)
           
 void clear()
          Clear all values from the ArrayParamterValue's internal storage.
 java.lang.Object clone()
          Return a shallow clone of the ArrayParameterValue
 ParameterValue cloneParameterValue(com.parabon.util.ObjectPool primePool)
          Returns a shallow clone of the ArrayParameterValue, using the specified ObjectPool for allocation.
 void destroy()
           
 void dumpArrayParameterValue(java.lang.String prefix)
           
 ParameterValue get(int i)
           
 byte[] getBinaryValue()
           
 byte[] getBinaryValue(int i)
           
 boolean getBooleanValue()
           
 boolean getBooleanValue(int i)
           
 java.util.Date getDateValue()
           
 java.util.Date getDateValue(int i)
           
 double getDoubleValue()
           
 double getDoubleValue(int i)
           
 ArrayParameterValue.Element getElement(int i)
           
 ArrayParameterValue.ElementIterator getElementIterator()
           
 float getFloatValue()
           
 float getFloatValue(int i)
           
 int getIntValue()
           
 int getIntValue(int i)
           
 java.util.Iterator<ParameterValue> getIterator()
           
 long getLongValue()
           
 long getLongValue(int i)
           
 java.lang.String getStringValue()
           
 java.lang.String getStringValue(int i)
           
 void readExternal(java.io.ObjectInput in)
           
 void reclaim()
           
 void remove(int i)
          Remove the value at position i in the internal List.
 void set(ArrayParameterValue o)
           
 void set(int i, boolean value)
          Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.
 void set(int i, byte[] value)
          Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.
 void set(int i, java.util.Date value)
          Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.
 void set(int i, double value)
          Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.
 void set(int i, long value)
          Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.
 void set(int i, ParameterValue value)
           
 void set(int i, java.lang.String value)
          Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.
protected  void setNoCopy(int i, ParameterValue value)
           
 int size()
          Return the number number of elements contained in this collection
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.parabon.common.ParameterValue
getBinaryValue, getBooleanValue, getDateValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getStringValue
 

Field Detail

elements

protected java.util.List<ParameterValue> elements

pool

protected com.parabon.util.ObjectPool pool

destroyed

protected boolean destroyed
Constructor Detail

ArrayParameterValue

public ArrayParameterValue(int initialCapacity,
                           com.parabon.util.ObjectPool pool_)

ArrayParameterValue

public ArrayParameterValue(com.parabon.util.ObjectPool pool_)

ArrayParameterValue

public ArrayParameterValue(int initialCapacity)

ArrayParameterValue

public ArrayParameterValue()
Method Detail

dumpArrayParameterValue

public void dumpArrayParameterValue(java.lang.String prefix)

reclaim

public void reclaim()
Specified by:
reclaim in interface com.parabon.util.ObjectPool.Reclaimable

destroy

public void destroy()
Specified by:
destroy in interface com.parabon.util.ObjectPool.Destroyable

get

public ParameterValue get(int i)

getIterator

public java.util.Iterator<ParameterValue> getIterator()

set

public void set(int i,
                ParameterValue value)

setNoCopy

protected void setNoCopy(int i,
                         ParameterValue value)

add

public void add(ParameterValue value)
Append a value to the ArrayParameterValue internal List.


addNoCopy

protected void addNoCopy(ParameterValue value)

remove

public void remove(int i)
Remove the value at position i in the internal List.


clear

public void clear()
Clear all values from the ArrayParamterValue's internal storage. This sets the state of the ArrayParameterValue to that of one that was newly created.


size

public int size()
Return the number number of elements contained in this collection


clone

public java.lang.Object clone()
Return a shallow clone of the ArrayParameterValue

Overrides:
clone in class java.lang.Object

cloneParameterValue

public ParameterValue cloneParameterValue(com.parabon.util.ObjectPool primePool)
Returns a shallow clone of the ArrayParameterValue, using the specified ObjectPool for allocation. The primePool may be null.

Specified by:
cloneParameterValue in interface ParameterValue

set

public void set(ArrayParameterValue o)

addElement

public void addElement(ArrayParameterValue.Element value)

getElement

public ArrayParameterValue.Element getElement(int i)

getElementIterator

public ArrayParameterValue.ElementIterator getElementIterator()

add

public void add(double value)
Append a value to the ArrayParameterValue's internal List.


add

public void add(long value)
Append a value to the ArrayParameterValue's internal List.


add

public void add(boolean value)
Append a value to the ArrayParameterValue's internal List.


add

public void add(byte[] value)
Append a value to the ArrayParameterValue's internal List.


add

public void add(java.util.Date value)
Append a value to the ArrayParameterValue's internal List.


add

public void add(java.lang.String value)
Append a value to the ArrayParameterValue's internal List.


set

public void set(int i,
                double value)
Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.


set

public void set(int i,
                long value)
Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.


set

public void set(int i,
                boolean value)
Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.


set

public void set(int i,
                byte[] value)
Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.


set

public void set(int i,
                java.util.Date value)
Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.


set

public void set(int i,
                java.lang.String value)
Set the value at position i to that of value If position i down not exist, an ArrayIndexOutOfBounds exception will be thrown.


getBooleanValue

public boolean getBooleanValue(int i)

getLongValue

public long getLongValue(int i)

getIntValue

public int getIntValue(int i)

getDoubleValue

public double getDoubleValue(int i)

getFloatValue

public float getFloatValue(int i)

getStringValue

public java.lang.String getStringValue(int i)

getDateValue

public java.util.Date getDateValue(int i)

getBinaryValue

public byte[] getBinaryValue(int i)

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

getBooleanValue

public boolean getBooleanValue()

getLongValue

public long getLongValue()

getIntValue

public int getIntValue()

getDoubleValue

public double getDoubleValue()

getFloatValue

public float getFloatValue()

getStringValue

public java.lang.String getStringValue()

getDateValue

public java.util.Date getDateValue()

getBinaryValue

public byte[] getBinaryValue()