org.sourcejammer.server.source
Class SimpleTextLineIterator

java.lang.Object
  |
  +--org.sourcejammer.server.source.SimpleTextLineIterator
All Implemented Interfaces:
java.io.Serializable, TextLineIterator

public class SimpleTextLineIterator
extends java.lang.Object
implements TextLineIterator, java.io.Serializable

See Also:
Serialized Form

Field Summary
private  int miIndex
           
private  java.util.Vector mvecLines
           
 
Constructor Summary
SimpleTextLineIterator(java.util.Vector vecLines)
           
 
Method Summary
 java.lang.String getNextLine()
          Returns the next line, if there are more lines to return.
 boolean hasMoreLines()
          Returns true if this text line iterator has more lines.
 void skipLines(int numLines)
          Skips the requested number of lines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mvecLines

private java.util.Vector mvecLines

miIndex

private int miIndex
Constructor Detail

SimpleTextLineIterator

public SimpleTextLineIterator(java.util.Vector vecLines)
Method Detail

hasMoreLines

public boolean hasMoreLines()
Description copied from interface: TextLineIterator
Returns true if this text line iterator has more lines.

Specified by:
hasMoreLines in interface TextLineIterator

getNextLine

public java.lang.String getNextLine()
                             throws EndOfSourceException
Description copied from interface: TextLineIterator
Returns the next line, if there are more lines to return.

Specified by:
getNextLine in interface TextLineIterator
Throws:
EndOfSourceException - -- if there are no more lines to return.

skipLines

public void skipLines(int numLines)
               throws EndOfSourceException
Description copied from interface: TextLineIterator
Skips the requested number of lines.

Specified by:
skipLines in interface TextLineIterator
Throws:
EndOfSourceException - -- if skipping requested number of lines would point index past end of source file.


Copyright 2003 Soucejammer project.