01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jface.text;
11:
12: /**
13: * A region describes a certain range in an indexed text store. Text stores are
14: * for example documents or strings. A region is defined by its offset into the
15: * text store and its length.
16: * <p>
17: * A region is considered a value object. Its offset and length do not change
18: * over time.
19: * <p>
20: * Clients may implement this interface or use the standard implementation
21: * {@link org.eclipse.jface.text.Region}.
22: * </p>
23: */
24: public interface IRegion {
25:
26: /**
27: * Returns the length of the region.
28: *
29: * @return the length of the region
30: */
31: int getLength();
32:
33: /**
34: * Returns the offset of the region.
35: *
36: * @return the offset of the region
37: */
38: int getOffset();
39: }
|