Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.search.ui.text
Class Match


java.lang.Object
  extended by 
org.eclipse.search.ui.text.Match

public class Match
extends Object

A textual match in a given object. This class may be instantiated and also subclassed (to add additional match state like accuracy, etc). The element a match is reported against is assumed to contain the match, and the UI will group matches against the same element together. A match has an offset and a length which may be specified in characters or in lines.

Since:
3.0

Field Summary
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 Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_LINE

public static final int UNIT_LINE
A constant expressing that offset and length of this match are specified in lines

See Also:
Constant Field Values

UNIT_CHARACTER

public static final int UNIT_CHARACTER
A constant expressing that offset and length of this match are specified in characters

See Also:
Constant Field Values
Constructor Detail

Match

public Match(
Object element,
             int unit,
             int offset,
             int length)
Constructs a new Match object.

Parameters:
element - the element that contains the match
unit - the unit offset and length are based on
offset - the offset the match starts at
length - the length of the match

Match

public Match(
Object element,
             int offset,
             int length)
Constructs a new Match object. The offset and length will be based on characters.

Parameters:
element - the element that contains the match
offset - the offset the match starts at
length - the length of the match
Method Detail

getOffset

public int getOffset()
Returns the offset of this match.

Returns:
the offset

setOffset

public void setOffset(int offset)
Sets the offset of this match.

Parameters:
offset - the offset to set

getLength

public int getLength()
Returns the length of this match.

Returns:
the length

setLength

public void setLength(int length)
Sets the length.

Parameters:
length - the length to set

getElement

public 
Object getElement()
Returns the element that contains this match. The element is used to group the match.

Returns:
the element that contains this match

getBaseUnit

public int getBaseUnit()
Returns whether match length and offset are expressed in lines or characters.

Returns:
either UNIT_LINE or UNIT_CHARACTER;

setFiltered

public void setFiltered(boolean value)
Marks this match as filtered or not.

Parameters:
value - true if the match is filtered; otherwise false
Since:
3.1

isFiltered

public boolean isFiltered()
Returns whether this match is filtered or not.

Returns:
true if the match is filtered; otherwise false
Since:
3.1

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire