platypus
Class ReadLine

java.lang.Object
  extended by platypus.ReadLine

public class ReadLine
extends java.lang.Object

Defines a ReadLine, which simply holds the line (as a string) and the line # from the imput file.

Author:
alb

Field Summary
private  java.lang.String lineContent
           
private  int lineNumber
           
 
Constructor Summary
ReadLine()
           
ReadLine(int number, java.lang.String text)
           
 
Method Summary
 java.lang.String getLineContent()
          return a string with the line content
 int getLineNumber()
          return the line number we're currently working on
 Tokens parse()
          Parses gid.currLine into a tokens[].
 Tokens parse(ReadLine rl)
          Parses the readline into an array of tokens.
 void setContent(java.lang.String newContent)
           
 void setLineNumber(int newNumber)
          Set line number
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineContent

private java.lang.String lineContent

lineNumber

private int lineNumber
Constructor Detail

ReadLine

public ReadLine()

ReadLine

public ReadLine(int number,
                java.lang.String text)
Method Detail

parse

public Tokens parse()
Parses gid.currLine into a tokens[]. A convenience function.

Returns:
array of tokens that constitute the line, preceded by a token containing the line #

parse

public Tokens parse(ReadLine rl)
Parses the readline into an array of tokens.

Parameters:
rl - the readline to process
Returns:
an array of tokens. Errors are handled by values returned in the array.

getLineNumber

public int getLineNumber()
return the line number we're currently working on

Returns:
lineNumber

getLineContent

public java.lang.String getLineContent()
return a string with the line content

Returns:
lineContent

setContent

public void setContent(java.lang.String newContent)

setLineNumber

public void setLineNumber(int newNumber)
Set line number

Parameters:
newNumber - the new line number


Copyright © 2006-7 Pacific Data Works LLC