home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 1.6 KB | 42 lines |
- /*
- * @(#ArrayAccess.java
- *
- * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
- *
- */
-
-
- package symantec.itools.db.beans.binding.databus;
-
- public interface ArrayAccess extends CollectionAccess
- {
- public int[] getDimensions();
-
-
- // The number of integers in the returned array indicates the number of dimensions in the object
- // implementing the ArrayAccess, and the value of each integer indicates the number of elements in the
- // ArrayAccess in that dimension -- e.g., a return value of {5,6,7} indicates a 5 x 6 x 7 three-dimensional
- // ArrayAccess.
-
- public DataItem getItemByCoordinates(int[] coordinates)
-
- throws ArrayIndexOutOfBoundsException;
-
-
- //This method provides a random-access way to retrieve a single data item from an ArrayAccess.
- //Retrieval of a DataItem via getItemByCoordinates() has no side effect on the cursor for the
- //ArrayAccess. Indexing in each dimension is zero-based; that is, coordinates[i] range from 0 to (
- //getDimensions()[i] - 1 ).
-
- public ArrayAccess subdivide( int[] startCoordinates,
-
- int[] endCoordinates)
-
- throws ArrayIndexOutOfBoundsException;
-
-
- // This method returns an ArrayAccess which is a subset of the ArrayAccess on which it was called, with
- // coordinates in the new subset readjusted to start at zero. The startCoordinates must be equal to or
- // greater than the endCoordinates for all dimensions. The method throws an
- // ArrayIndexOutOfBoundsException on an out-of-bounds access.
- }