com.smardec.j2native
Interface ArrayType

All Known Implementing Classes:
ArrayArgument

public interface ArrayType

Common interface for all types representing arrays.


Method Summary
 void fromArgumentsArray(Argument[] arguments)
          Sets array contents to the given values.
 Argument getElement(int index)
          Returns an array item specified by an index.
 int getElementsCount()
          Returns the number of elements in the array.
 void setElement(int index, Argument element)
          Replaces an array item with the specified object.
 void setElementsCount(int newCount)
          Resizes this array to a given size.
 Argument[] toArgumentsArray()
          Returns items as Java array.
 

Method Detail

getElement

public Argument getElement(int index)
Returns an array item specified by an index.

Parameters:
index - index of a requested array item
Returns:
Argument item

setElement

public void setElement(int index,
                       Argument element)
Replaces an array item with the specified object.

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

getElementsCount

public int getElementsCount()
Returns the number of elements in the array.

Returns:
elements quantity

setElementsCount

public void setElementsCount(int newCount)
Resizes this array to a given size.

Parameters:
newCount - new array size

toArgumentsArray

public Argument[] toArgumentsArray()
Returns items as Java array.

Returns:
Argument[]

fromArgumentsArray

public void fromArgumentsArray(Argument[] arguments)
Sets array contents to the given values.

Parameters:
arguments - Argument[] array ot the new values


Copyright © 2004-2006 Smardec. All Rights Reserved.