Algernon Software

org.algernon.util
Class ErrorSet

java.lang.Object
  extended byorg.algernon.util.ErrorSet

public class ErrorSet
extends Object

This class collects errors during compilation and processing. If its size is 0 after an operation, there were no errors. Otherwise, it contains Strings that can be displayed to the user.


Field Summary
protected  Collection m_errors
           
protected  Collection m_warnings
           
 
Constructor Summary
ErrorSet()
           
 
Method Summary
 void addError(String newError)
          Adds a new warning to the error set.
 void addWarning(String newWarning)
          Adds a new warning to the error set.
 void clear()
           
 void clearErrors()
           
 void clearWarnings()
           
 Collection getErrors()
          Returns a collection of errors, which are Strings.
 Collection getWarnings()
          Returns a collection of warnings, which are Strings.
 int size()
          Returns the number of errors plus the number of warnings.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_errors

protected Collection m_errors

m_warnings

protected Collection m_warnings
Constructor Detail

ErrorSet

public ErrorSet()
Method Detail

toString

public String toString()

size

public int size()
Returns the number of errors plus the number of warnings.


getErrors

public Collection getErrors()
Returns a collection of errors, which are Strings.


getWarnings

public Collection getWarnings()
Returns a collection of warnings, which are Strings.


clear

public void clear()

clearErrors

public void clearErrors()

clearWarnings

public void clearWarnings()

addWarning

public void addWarning(String newWarning)
Adds a new warning to the error set. If the new warning is null, it is not added.


addError

public void addError(String newError)
Adds a new warning to the error set. If the new warning is null, it is not added.


Algernon Software