flattree.flat.write
Class DelimitedWriteLine

java.lang.Object
  extended by flattree.flat.write.DelimitedWriteLine
All Implemented Interfaces:
EscapableLine, Line, Position, WriteLine

public class DelimitedWriteLine
extends Object
implements WriteLine, EscapableLine

A line delimited by one or more characters.


Constructor Summary
DelimitedWriteLine(WriteLine line, String delimiter)
          Delimit the given line.
 
Method Summary
 void escape(boolean escape)
          Shoulds the delimitation of this line be obeyed or escaped from.
 void flush()
          Flush all contents.
 int getColumnIndex()
          Get the current column index.
 int getIndex()
          Get the index of the current character.
 int getRowIndex()
          Get the current row index.
 void write(char character)
          Write the next character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelimitedWriteLine

public DelimitedWriteLine(WriteLine line,
                          String delimiter)
Delimit the given line.

Parameters:
line - line to delimit
delimiter - the delimiter which marks the delimit
Method Detail

escape

public void escape(boolean escape)
Description copied from interface: EscapableLine
Shoulds the delimitation of this line be obeyed or escaped from.

Specified by:
escape in interface EscapableLine

getIndex

public int getIndex()
Description copied from interface: Position
Get the index of the current character.

Specified by:
getIndex in interface Position
Returns:
index

getRowIndex

public int getRowIndex()
Description copied from interface: Position
Get the current row index.

Specified by:
getRowIndex in interface Position
Returns:
row index

getColumnIndex

public int getColumnIndex()
Description copied from interface: Position
Get the current column index.

Specified by:
getColumnIndex in interface Position
Returns:
column index

write

public void write(char character)
Description copied from interface: WriteLine
Write the next character.

Specified by:
write in interface WriteLine
Parameters:
character - character to write

flush

public void flush()
Description copied from interface: WriteLine
Flush all contents. Should be called only once, no invocations of WriteLine.write(char) are allowed afterwards.

Specified by:
flush in interface WriteLine


Copyright © 2011. All Rights Reserved.