us.zuercher.gpx2map.util
Class MessageSink

java.lang.Object
  extended by us.zuercher.gpx2map.util.MessageSink
Direct Known Subclasses:
GuiProgressMeter, NoOpMessageSink, PrintStreamMessageSink

public abstract class MessageSink
extends Object

MessageSink represents a sink of informational messages generating while downloading and plotting GPS data on maps.

Author:
Stephan Zuercher

Constructor Summary
MessageSink()
           
 
Method Summary
abstract  void newLine()
          Implementation-defined mechanism for starting a new line of output.
 void write(boolean x)
          Converts the given boolean value to a String and writes it to the sink.
 void write(double x)
          Converts the given double-precisions floating point value to a String and writes it to the sink.
 void write(float x)
          Converts the given floating point number to a String and writes it to the sink.
 void write(int x)
          Converts the given integer to a String and writes it to the sink.
 void write(long x)
          Converts the given long integer to a String and writes it to the sink.
abstract  void write(String message)
          Implementation-defined mechanism for outputing String data.
 void writeLine(boolean x)
          Write the boolean value and generate a new-line.
 void writeLine(double x)
          Write the double-precision floating point value and generate a new-line.
 void writeLine(float x)
          Write the floating point value and generate a new-line.
 void writeLine(int x)
          Write the integer and generate a new-line.
 void writeLine(long x)
          Write the long integer and generate a new-line.
 void writeLine(String message)
          Write the String and generate a new-line.
 void writeLine(Throwable t)
          Converts the given Throwable to a series of stack trace lines and writes them to the sink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageSink

public MessageSink()
Method Detail

write

public abstract void write(String message)
Implementation-defined mechanism for outputing String data.

Parameters:
message - the data to output

newLine

public abstract void newLine()
Implementation-defined mechanism for starting a new line of output.


writeLine

public void writeLine(String message)
Write the String and generate a new-line.

Parameters:
message - output data

write

public void write(int x)
Converts the given integer to a String and writes it to the sink.

Parameters:
x - an integer

writeLine

public void writeLine(int x)
Write the integer and generate a new-line.

Parameters:
x - an integer

write

public void write(long x)
Converts the given long integer to a String and writes it to the sink.

Parameters:
x - a long integer

writeLine

public void writeLine(long x)
Write the long integer and generate a new-line.

Parameters:
x - a long integer

write

public void write(float x)
Converts the given floating point number to a String and writes it to the sink.

Parameters:
x - a floating point number

writeLine

public void writeLine(float x)
Write the floating point value and generate a new-line.

Parameters:
x - a floating point value

write

public void write(double x)
Converts the given double-precisions floating point value to a String and writes it to the sink.

Parameters:
x - a double precision floating point value

writeLine

public void writeLine(double x)
Write the double-precision floating point value and generate a new-line.

Parameters:
x - a double-precision floating point value

write

public void write(boolean x)
Converts the given boolean value to a String and writes it to the sink.

Parameters:
x - a boolean value

writeLine

public void writeLine(boolean x)
Write the boolean value and generate a new-line.

Parameters:
x - a boolean value

writeLine

public void writeLine(Throwable t)
Converts the given Throwable to a series of stack trace lines and writes them to the sink.

Parameters:
t - a Throwable