org.eclipse.jface.text
Class Region
java.lang.Object
|
+--org.eclipse.jface.text.Region
- All Implemented Interfaces:
- IRegion
- Direct Known Subclasses:
- TypedRegion
- public class Region
- extends Object
- implements IRegion
A default implementation of the IRegion
interface.
Constructor Summary |
Region(int offset,
int length)
Create a new region. |
Method Summary |
boolean |
equals(Object o)
Two regions are equal if they have the same offset and length. |
int |
getLength()
Returns the length of the region. |
int |
getOffset()
Returns the offset of the region. |
int |
hashCode()
|
Region
public Region(int offset,
int length)
- Create a new region.
- Parameters:
offset
- the offset of the regionlength
- the length of the region
getLength
public int getLength()
- Description copied from interface:
IRegion
- Returns the length of the region.
- Specified by:
getLength
in interface IRegion
- Following copied from interface:
org.eclipse.jface.text.IRegion
- Returns:
- the length of the region
getOffset
public int getOffset()
- Description copied from interface:
IRegion
- Returns the offset of the region.
- Specified by:
getOffset
in interface IRegion
- Following copied from interface:
org.eclipse.jface.text.IRegion
- Returns:
- the offset of the region
equals
public boolean equals(Object o)
- Two regions are equal if they have the same offset and length.
- Overrides:
equals
in class Object
- See Also:
Object.equals(Object)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.