com.voytechs.jnetstream.codec
Class NoteImpl

java.lang.Object
  extended by com.voytechs.jnetstream.codec.NoteImpl
All Implemented Interfaces:
Note

public class NoteImpl
extends java.lang.Object
implements Note


Field Summary
 java.lang.String msg
           
 
Constructor Summary
NoteImpl(java.lang.String msg)
           
NoteImpl(java.lang.String msg, boolean displayName)
           
 
Method Summary
 boolean getNewlineFlag()
          Returns the stat of the newline flag.
 boolean getPrefixFlag()
          Returns the state of the display prefix flag.
static void main(java.lang.String[] args)
          Test function for NoteImpl
 void setNewlineFlag(boolean stat)
          Do not display new line after the end of the note.
 void setPrefixFlag(boolean stat)
          Sets the flag which determines if prefix is displayed or not.
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String pre, boolean indentFirstLine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

msg

public java.lang.String msg
Constructor Detail

NoteImpl

public NoteImpl(java.lang.String msg)
Parameters:
-
Throws:

NoteImpl

public NoteImpl(java.lang.String msg,
                boolean displayName)
Parameters:
-
Throws:
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface Note
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String pre,
                                 boolean indentFirstLine)
Specified by:
toString in interface Note

setNewlineFlag

public void setNewlineFlag(boolean stat)
Do not display new line after the end of the note.

Parameters:
stat - State of the newline flag. True mean print newline, false do not.

getNewlineFlag

public boolean getNewlineFlag()
Returns the stat of the newline flag.

Returns:
true means print newline and false means do not.

setPrefixFlag

public void setPrefixFlag(boolean stat)
Sets the flag which determines if prefix is displayed or not.

Parameters:
stat - Display prefix if true, otherwise not.

getPrefixFlag

public boolean getPrefixFlag()
Returns the state of the display prefix flag. If true a prefix should be displayed, if false then not. Prefix is displayer specific but usually is the name of the protocol with appropriate amount of spaces for alignment.

Returns:
Display prefix if true, otherwise not.

main

public static void main(java.lang.String[] args)
Test function for NoteImpl

Parameters:
args - command line arguments