KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > model > IIndexedValue


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.core.model;
12
13 import org.eclipse.debug.core.DebugException;
14
15 /**
16  * A value containing an indexed collection of variables - for example,
17  * an array.
18  * <p>
19  * The indexed collection value has been added to the debug model to support
20  * automatic partitioning of large arrays in the debug UI. Clients are not required
21  * to implement this interface for values representing indexed collections,
22  * however, doing so will provide enhanced display options in the debug UI.
23  * </p>
24  * <p>
25  * Clients may implement this interface.
26  * </p>
27  * @since 3.0
28  */

29 public interface IIndexedValue extends IValue {
30     
31     /**
32      * Returns the variable at the given offset in this collection.
33      * The offset is zero based.
34      * @param offset zero based offset into this collection
35      * @return returns the variable in this collection at the given
36      * offset
37      * @throws DebugException if unable to retrieve the variable at the
38      * given offset
39      */

40     public IVariable getVariable(int offset) throws DebugException;
41     
42     /**
43      * Returns a subset of the elements in this collection of variables as
44      * specified by the given offset and length.
45      *
46      * @param offset beginning offset of the subset of elements to return
47      * @param length the number of elements to return
48      * @return a subset of the elements in this collection of variables as
49      * specified by the given offset and length
50      * @throws DebugException if unable to retrieve the variables
51      */

52     public IVariable[] getVariables(int offset, int length) throws DebugException;
53
54     /**
55      * Returns the number of entries in this indexed collection.
56      *
57      * @return the number of entries in this indexed collection
58      * @throws DebugException if unable to determine the number
59      * of entries in this collection
60      */

61     public int getSize() throws DebugException;
62     
63     /**
64      * Returns the index of the first variable contained in this value.
65      * Generally, indexed values are zero based, but this allows for
66      * an arbitrary base offset.
67      *
68      * @return the index of the first variable contained in this value
69      */

70     public int getInitialOffset();
71 }
72
Popular Tags