edu.rice.cs.drjava.model
Class FindResult

java.lang.Object
  extended by edu.rice.cs.drjava.model.FindResult

public class FindResult
extends Object

Returned to FindMachineDialog with the location of the found string (or -1 if the string was not found) as well as a flag indicating whether the machine wrapped around the end of the document.

Version:
$Id: FindResult.java 5236 2010-04-27 01:43:36Z mgricken $

Field Summary
private  boolean _allWrapped
           
private  OpenDefinitionsDocument _document
           
private  int _foundoffset
           
private  boolean _wrapped
           
 
Constructor Summary
FindResult(OpenDefinitionsDocument document, int foundoffset, boolean wrapped, boolean allWrapped)
          Constructor for a FindResult.
 
Method Summary
 boolean getAllWrapped()
          Returns true if the search wrapped to the start document.
 OpenDefinitionsDocument getDocument()
          Returns the document where the found instance is located
 int getFoundOffset()
          Returns the offset of the instance found
 boolean getWrapped()
          Returns true if the search wrapped to the beginning (or end) of the document
 String toString()
          Intelligible toString method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_document

private OpenDefinitionsDocument _document

_foundoffset

private int _foundoffset

_wrapped

private boolean _wrapped

_allWrapped

private boolean _allWrapped
Constructor Detail

FindResult

public FindResult(OpenDefinitionsDocument document,
                  int foundoffset,
                  boolean wrapped,
                  boolean allWrapped)
Constructor for a FindResult.

Parameters:
document - the document where the found instance is located
foundoffset - the offset of the instance found
wrapped - true if the search wrapped to the beginning (or end) of the document
allWrapped - true if the search wrapped to the start document
Method Detail

toString

public String toString()
Intelligible toString method

Overrides:
toString in class Object

getDocument

public OpenDefinitionsDocument getDocument()
Returns the document where the found instance is located


getFoundOffset

public int getFoundOffset()
Returns the offset of the instance found


getWrapped

public boolean getWrapped()
Returns true if the search wrapped to the beginning (or end) of the document


getAllWrapped

public boolean getAllWrapped()
Returns true if the search wrapped to the start document.