KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Default implementation of {@link ILineRange}.
15  *
16  * @since 3.0
17  */

18 public final class LineRange implements ILineRange {
19
20     private int fStartLine;
21     private int fNumberOfLines;
22
23     /**
24      * Creates a new line range with the given specification.
25      *
26      * @param startLine the start line
27      * @param numberOfLines the number of lines
28      */

29     public LineRange(int startLine, int numberOfLines) {
30         fStartLine= startLine;
31         fNumberOfLines= numberOfLines;
32     }
33
34     /*
35      * @see org.eclipse.jface.text.source.ILineRange#getStartLine()
36      */

37     public int getStartLine() {
38         return fStartLine;
39     }
40
41     /*
42      * @see org.eclipse.jface.text.source.ILineRange#getNumberOfLines()
43      */

44     public int getNumberOfLines() {
45         return fNumberOfLines;
46     }
47 }
48
Popular Tags