KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > textmanipulation > TextRegion


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.jdt.internal.corext.textmanipulation;
12
13
14 /**
15  * A text region describes a certain range in an <code>ITextBuffer</code>. A region is defined by
16  * its offset into the text buffer and its length.
17  * <p>
18  * A region is considered a value object. Its offset or length do not change over time. </p>
19  * <p>
20  * <bf>NOTE:<bf> This class/interface is part of an interim API that is still under development
21  * and expected to change significantly before reaching stability. It is being made available at
22  * this early stage to solicit feedback from pioneering adopters on the understanding that any
23  * code that uses this API will almost certainly be broken (repeatedly) as the API evolves.</p>
24  */

25
26 // This class avoids contamination of clients with wrong imports.
27

28 public abstract class TextRegion {
29     
30     /**
31      * Returns the offset of the region.
32      *
33      * @return the offset of the region
34      */

35     public abstract int getOffset();
36     /**
37      * Returns the length of the region.
38      *
39      * @return the length of the region
40      */

41     public abstract int getLength();
42     
43 }
44
Popular Tags