new version with WorkingCopy Management
[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  * @see ISourceRange
28  */
29 public int getLength() {
30         return this.length;
31 }
32 /**
33  * @see ISourceRange
34  */
35 public int getOffset() {
36         return this.offset;
37 }
38 public String toString() {
39         StringBuffer buffer = new StringBuffer();
40         buffer.append("[offset="); //$NON-NLS-1$
41         buffer.append(this.offset);
42         buffer.append(", length="); //$NON-NLS-1$
43         buffer.append(this.length);
44         buffer.append("]"); //$NON-NLS-1$
45         return buffer.toString();
46 }
47 }