net.charlesames.utility.io
Interface TextFileDocument<T extends TextError>

Type Parameters:
T - Text error instance class.
All Superinterfaces:
FileDocument

public interface TextFileDocument<T extends TextError>
extends FileDocument

Interface for entities which persist their content in text files.

Author:
Charles Ames

Method Summary
 void clearErrors()
          Clear the collection of errors.
 java.util.List<T> getErrors()
          Get the collection of errors generated during the most recent file load.
 void logError(int lineNumber, int start, int end, java.lang.String message)
          Handle an error encountered while loading this document.
 
Methods inherited from interface net.charlesames.utility.io.FileDocument
dispose, getFile, getLoadDate, isDirty, load, makeDirty, save, setFile
 

Method Detail

getErrors

java.util.List<T> getErrors()
Get the collection of errors generated during the most recent file load.

Returns:
The collection of errors generated during the most recent file load.

logError

void logError(int lineNumber,
              int start,
              int end,
              java.lang.String message)
Handle an error encountered while loading this document.

Parameters:
lineNumber - The text line number in which this error occurred.
start - The left bound of the text-selection region where the error occurred.
end - The right bound of the text-selection region where the error occurred.
message - A text string describing the error.

clearErrors

void clearErrors()
Clear the collection of errors.