A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceRange.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
12
13 import net.sourceforge.phpdt.core.ISourceRange;
14
15 /**
16  * @see ISourceRange
17  */
18 /* package */class SourceRange implements ISourceRange {
19
20         protected int offset, length;
21
22         protected SourceRange(int offset, int length) {
23                 this.offset = offset;
24                 this.length = length;
25         }
26
27         /**
28          * @see ISourceRange
29          */
30         public int getLength() {
31                 return this.length;
32         }
33
34         /**
35          * @see ISourceRange
36          */
37         public int getOffset() {
38                 return this.offset;
39         }
40
41         public String toString() {
42                 StringBuffer buffer = new StringBuffer();
43                 buffer.append("[offset="); //$NON-NLS-1$
44                 buffer.append(this.offset);
45                 buffer.append(", length="); //$NON-NLS-1$
46                 buffer.append(this.length);
47                 buffer.append("]"); //$NON-NLS-1$
48                 return buffer.toString();
49         }
50 }