public class Match extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UNIT_CHARACTER
A constant expressing that offset and length of this match are specified
in characters
|
static int |
UNIT_LINE
A constant expressing that offset and length of this match are specified
in lines
|
Constructor and Description |
---|
Match(Object element,
int offset,
int length)
Constructs a new Match object.
|
Match(Object element,
int unit,
int offset,
int length)
Constructs a new Match object.
|
Modifier and Type | Method and Description |
---|---|
int |
getBaseUnit()
Returns whether match length and offset are expressed in lines or
characters.
|
Object |
getElement()
Returns the element that contains this match.
|
int |
getLength()
Returns the length of this match.
|
int |
getOffset()
Returns the offset of this match.
|
boolean |
isFiltered()
Returns whether this match is filtered or not.
|
void |
setFiltered(boolean value)
Marks this match as filtered or not.
|
void |
setLength(int length)
Sets the length.
|
void |
setOffset(int offset)
Sets the offset of this match.
|
public static final int UNIT_LINE
public static final int UNIT_CHARACTER
public Match(Object element, int unit, int offset, int length)
element
- the element that contains the matchunit
- the unit offset and length are based onoffset
- the offset the match starts atlength
- the length of the matchpublic Match(Object element, int offset, int length)
element
- the element that contains the matchoffset
- the offset the match starts atlength
- the length of the matchpublic int getOffset()
public void setOffset(int offset)
offset
- the offset to setpublic int getLength()
public void setLength(int length)
length
- the length to setpublic Object getElement()
public int getBaseUnit()
public void setFiltered(boolean value)
value
- true
if the match is filtered;
otherwise false
public boolean isFiltered()
true if the match is filtered;
otherwise false
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.