home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / prosrc.bin / ArrayAccess.java < prev    next >
Encoding:
Java Source  |  1998-03-18  |  1.6 KB  |  42 lines

  1. /*
  2.  * @(#ArrayAccess.java
  3.  *
  4.  * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
  5.  *
  6.  */
  7.  
  8.  
  9. package symantec.itools.db.beans.binding.databus;
  10.  
  11. public interface ArrayAccess extends CollectionAccess
  12. {
  13. public int[] getDimensions();
  14.  
  15.  
  16.     // The number of integers in the returned array indicates the number of dimensions in the object
  17.     // implementing the ArrayAccess, and the value of each integer indicates the number of elements in the
  18.     // ArrayAccess in that dimension -- e.g., a return value of {5,6,7} indicates a 5 x 6 x 7 three-dimensional
  19.     // ArrayAccess.
  20.  
  21. public DataItem getItemByCoordinates(int[] coordinates)
  22.  
  23.                 throws ArrayIndexOutOfBoundsException;
  24.  
  25.  
  26.      //This method provides a random-access way to retrieve a single data item from an ArrayAccess.
  27.      //Retrieval of a DataItem via getItemByCoordinates() has no side effect on the cursor for the
  28.      //ArrayAccess. Indexing in each dimension is zero-based; that is, coordinates[i] range from 0 to (
  29.      //getDimensions()[i] - 1 ).
  30.  
  31. public ArrayAccess subdivide( int[] startCoordinates,
  32.  
  33.                               int[] endCoordinates)
  34.  
  35.                    throws ArrayIndexOutOfBoundsException;
  36.  
  37.  
  38.     // This method returns an ArrayAccess which is a subset of the ArrayAccess on which it was called, with
  39.     // coordinates in the new subset readjusted to start at zero. The startCoordinates must be equal to or
  40.     // greater than the endCoordinates for all dimensions. The method throws an
  41.     // ArrayIndexOutOfBoundsException on an out-of-bounds access.
  42. }