blob: b2185006de7660ddcce0863e00105b6a4e84201b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*******************************************************************************/
package org.eclipse.dltk.internal.core;
import org.eclipse.dltk.core.ISourceRange;
/**
* use {@link org.eclipse.dltk.core.SourceRange}
*/
@Deprecated
public class SourceRange implements ISourceRange {
private int offset, length;
public SourceRange(int offset, int length) {
this.offset = offset;
this.length = length;
}
@Override
public int getLength() {
return length;
}
@Override
public int getOffset() {
return offset;
}
@Override
public String toString() {
int end = getOffset() + getLength() - 1;
return "[" + getOffset() + "," + end + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}