|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Producers that allow a consumer to change the shape of an array, including changing the dimensions, the number of dimensions, or inserting or deleting all elements in a particular dimension implement the ReshapeableArrayAccess interface to indicate their willingness to change the shape and provide methods used for this purpose. ReshapeableArrayAccess extends ArrayAccess.
ArrayAccess
Method Summary | |
void |
delete(int dimension,
int position,
int count)
This method is called to delete cells, columns, rows, planes, etc, in a specified dimension. |
void |
insert(int dimension,
int position,
int count)
This method is called to insert additional cells, columns, rows, planes, etc, in a specified dimension. |
void |
setDimensions(int[] newDimensions)
This method can be called to change the dimensions of an existing array. |
Methods inherited from interface javax.infobus.ArrayAccess |
getDimensions,
getItemByCoordinates,
setItemByCoordinates,
subdivide |
Method Detail |
public void setDimensions(int[] newDimensions) throws java.lang.IllegalArgumentException
All producers that implement this interface must be able to change existing dimensions. Producers may or may not support a change to the number of dimensions; those that do not support a change in number of dimensions throw the UnsupportedOperationException for such attempts.
newDimensions
- the number of integers indicate the requested number of
dimensions in the object implementing the ArrayAccess, and the value of
each integer indicates the requested number of elements in the ArrayAccess
in that dimension.ArrayAccess.getDimensions()
public void insert(int dimension, int position, int count) throws java.lang.IllegalArgumentException
When adding cells in a given dimension, the extents of the other dimensions are unchanged.
dimension
- specifies which entry will be affected in the array of
dimensions for this array (as returned by getDimensions()).position
- is a zero-based cell offset in the specified dimension. When
position is zero up to the extent for the indicated dimension, cells are
inserted before the indicated cell. When position is equal to the extent
for the indicated dimension, cells are appended at the end of the array.count
- specifies the number of cells to be inserted in the specified
dimension. When count is equal to the number of cells in the specified
dimension, the new cells are appended at the end of the dimension.ArrayAccess.getDimensions()
public void delete(int dimension, int position, int count) throws java.lang.IllegalArgumentException
dimension
- specifies which entry will be affected in the array of
dimensions for this array (as returned by getDimensions()).position
- is a zero-based cell offset in the specified dimension. When
position is zero up to the extent for the indicated dimension, deletions
start at the indicated cell.count
- specifies the number of deletions in the specified dimension; it
must be greater than zero, and less than the remaining cells of the indicated
dimension starting with the indicated position.ArrayAccess.getDimensions()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |