KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > IRegion


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.jface.text;
12
13
14 /**
15  * A region describes a certain range in an indexed text store. Text stores are
16  * for example documents or strings. A region is defined by its offset into the
17  * text store and its length.
18  * <p>
19  * A region is considered a value object. Its offset and length do not change
20  * over time.
21  * <p>
22  * Clients may implement this interface or use the standard implementation
23  * {@link org.eclipse.jface.text.Region}.
24  * </p>
25  */

26 public interface IRegion {
27
28     /**
29      * Returns the length of the region.
30      *
31      * @return the length of the region
32      */

33     int getLength();
34
35     /**
36      * Returns the offset of the region.
37      *
38      * @return the offset of the region
39      */

40     int getOffset();
41 }
42
Popular Tags