gov.llnl.babel.msg
Class MsgList

java.lang.Object
  extended by gov.llnl.babel.msg.MsgList

public class MsgList
extends java.lang.Object

Contains a list of UserMsg, and displays various subsets of them

See Also:
UserMsg

Constructor Summary
MsgList()
          Create an empty message list
 
Method Summary
 void addMsg(UserMsg msg)
          Add a new message to the List
 boolean fatal_message()
          Returns true iff a fatal message is included in the list.
 void print(java.io.PrintStream out)
           
 void setFatalCondition(int type, boolean setOrNot)
          Set a particular type of message to trigger fatal errors, or not.
 void setPrintCondition(int type, boolean setOrNot)
          Set a particular type of message to print or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsgList

public MsgList()
Create an empty message list

Method Detail

addMsg

public void addMsg(UserMsg msg)
Add a new message to the List


fatal_message

public boolean fatal_message()
Returns true iff a fatal message is included in the list.


setPrintCondition

public void setPrintCondition(int type,
                              boolean setOrNot)
Set a particular type of message to print or not. By default, errors and warnings are printed, remarks are not. Note that internal errors are always printed and cannot be suppressed.

Parameters:
type - one of UserMsg.ERROR, UserMsg.WARNING, or UserMsg.REMARK
setOrNot - true enables printing, false disables

setFatalCondition

public void setFatalCondition(int type,
                              boolean setOrNot)
Set a particular type of message to trigger fatal errors, or not. By default errors are fatal, warnings and remarks are not. Note that internal errors are always fatal and cannot be changed.

Parameters:
type - one of UserMsg.ERROR, UserMsg.WARNING, or UserMsg.REMARK
setOrNot - true enables printing, false disables

print

public void print(java.io.PrintStream out)