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 4691 2008-12-02 23:33:27Z dlsmith $

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
 

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.