KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > source > ILineRange


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.source;
12
13 /**
14  * Describes a range of lines.
15  * <p>
16  * Note that the number of lines is 1-based, e.g. <code>getStartLine() + getNumberOfLines()</code>
17  * computes the first line <em>after</em> the range, and a range with
18  * <code>getNumberOfLines() == 0</code> is empty.
19  * </p>
20  *
21  * @since 3.0
22  */

23 public interface ILineRange {
24
25     /**
26      * Returns the start line of this line range or <code>-1</code>.
27      *
28      * @return the start line of this line range or <code>-1</code> if this line range is invalid.
29      */

30     int getStartLine();
31
32     /**
33      * Returns the number of lines of this line range or <code>-1</code>.
34      *
35      * @return the number of lines in this line range or <code>-1</code> if this line range is invalid.
36      */

37     int getNumberOfLines();
38 }
39
Popular Tags