Class RealObject.DescriptionLineProcessor

java.lang.Object
  |
  +--RealObject.DescriptionLineProcessor
All Implemented Interfaces:
LineProcessor
Enclosing class:
RealObject

class RealObject.DescriptionLineProcessor
extends java.lang.Object
implements LineProcessor

This class is used in a callback context to process lines in a long description file.


Field Summary
(package private)  java.lang.String retval
           
 
Constructor Summary
(package private) RealObject.DescriptionLineProcessor()
           
 
Method Summary
 void ioException(java.lang.String gameFile, java.io.IOException e)
          Called when file reader gets an IO error.
 void noSuchFile(java.lang.String gameFile)
          Called when we tried to process a nonexistent file.
 boolean processLine(java.lang.String line, int number)
          Process a line from a long description file.
 java.lang.String toString()
          Called when we're all done to give us a chance to tell what happened.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

retval

java.lang.String retval
Constructor Detail

RealObject.DescriptionLineProcessor

RealObject.DescriptionLineProcessor()
Method Detail

ioException

public void ioException(java.lang.String gameFile,
                        java.io.IOException e)
Called when file reader gets an IO error. Returns nothing, but remembers.
Specified by:
ioException in interface LineProcessor
Parameters:
gameFile - name of file
e - exception that got us here. Not currently used.

noSuchFile

public void noSuchFile(java.lang.String gameFile)
Called when we tried to process a nonexistent file. Returns nothing, but remembers.
Specified by:
noSuchFile in interface LineProcessor
Parameters:
gameFile - name of file

processLine

public boolean processLine(java.lang.String line,
                           int number)
Process a line from a long description file. If it finds a good one, it will remember it.
Specified by:
processLine in interface LineProcessor
Parameters:
line - A line of the form predicate ~ description
number - The current line number, for messages
Returns:
false if we should stop reading lines, usually because the predicate was true, but maybe due to some kind of problem. True to continue.

toString

public java.lang.String toString()
Called when we're all done to give us a chance to tell what happened.
Overrides:
toString in class java.lang.Object
Returns:
the True Description of the object, if all went well, otherwise some default or error message.