flattree.flat.write
Class StringWriteLine

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

public class StringWriteLine
extends Object
implements WriteLine

A line wrapping a String.


Constructor Summary
StringWriteLine()
           
 
Method Summary
 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.
 String toString()
          Get the written string.
 void write(char character)
          Write the next character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringWriteLine

public StringWriteLine()
Method Detail

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

getIndex

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

Specified by:
getIndex in interface Position
Returns:
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

toString

public String toString()
Get the written string.

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.