com.jniwrapper
Interface ArrayParameter

All Known Implementing Classes:
ComplexArray, PrimitiveArray

public interface ArrayParameter

Common interface for all types representing arrays.


Method Summary
 void forceElementCount(int elementCount)
          Sets a new array size without memory reallocation.
 void fromParameterArray(Parameter[] params)
          Sets array contents to the given values.
 Parameter getElement(int i)
          Returns an array item specified by an index.
 int getElementCount()
          Returns the number of elements in the array.
 void setElement(int i, Parameter elem)
          Replaces an array item with the specified object.
 void setElementCount(int elementCount)
          Resizes this array to a given size.
 Parameter[] toParameterArray()
          Returns items as Java array.
 

Method Detail

getElement

Parameter getElement(int i)
Returns an array item specified by an index.

Parameters:
i - index of a requested array item

setElement

void setElement(int i,
                Parameter elem)
Replaces an array item with the specified object.

Parameters:
i - index of an item to be replaced
elem - object to be set as array item

getElementCount

int getElementCount()
Returns the number of elements in the array.


setElementCount

void setElementCount(int elementCount)
Resizes this array to a given size.


toParameterArray

Parameter[] toParameterArray()
Returns items as Java array.


fromParameterArray

void fromParameterArray(Parameter[] params)
Sets array contents to the given values.


forceElementCount

void forceElementCount(int elementCount)
Sets a new array size without memory reallocation. This method should be used with caution as the array may access invalid memory area if an incorrect value is passed in the argument.