edu.ksu.cis.projects.bogor.module
Class DefaultMessageStore

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.module.DefaultMessageStore
All Implemented Interfaces:
IMessageStore

public class DefaultMessageStore
extends Object
implements IMessageStore

Version:
CVS $Revision: 1.3 $ $Date: 2004/12/18 22:36:33 $
Author:
Matt Hoosier

Constructor Summary
DefaultMessageStore()
          Optimized constructor that doesn't allocate empty lists.
DefaultMessageStore(Collection<FileMessage> errors, Collection<FileMessage> warnings)
           
DefaultMessageStore(FileMessage[] errors, FileMessage[] warnings)
           
 
Method Summary
 FileMessage getError(int index)
           
 int getErrorCount()
           
 List<FileMessage> getErrors()
          Fetch a shallow-cloned copy of the underlying error messages.
 FileMessage getWarning(int index)
           
 int getWarningCount()
           
 List<FileMessage> getWarnings()
          Fetch a shallow-cloned copy of the underlying warnings messages.
 void merge(IMessageStore other)
          Destructively insert the contents of the second message collection into this one.
 void removeError(int index)
           
 void removeWarning(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageStore

public DefaultMessageStore(FileMessage[] errors,
                           FileMessage[] warnings)

DefaultMessageStore

public DefaultMessageStore(Collection<FileMessage> errors,
                           Collection<FileMessage> warnings)

DefaultMessageStore

public DefaultMessageStore()
Optimized constructor that doesn't allocate empty lists.

Method Detail

getError

public FileMessage getError(int index)
Specified by:
getError in interface IMessageStore

removeError

public void removeError(int index)
Specified by:
removeError in interface IMessageStore

getErrorCount

public int getErrorCount()
Specified by:
getErrorCount in interface IMessageStore

getErrors

public List<FileMessage> getErrors()
Description copied from interface: IMessageStore
Fetch a shallow-cloned copy of the underlying error messages.

Specified by:
getErrors in interface IMessageStore

getWarning

public FileMessage getWarning(int index)
Specified by:
getWarning in interface IMessageStore

removeWarning

public void removeWarning(int index)
Specified by:
removeWarning in interface IMessageStore

getWarningCount

public int getWarningCount()
Specified by:
getWarningCount in interface IMessageStore

getWarnings

public List<FileMessage> getWarnings()
Description copied from interface: IMessageStore
Fetch a shallow-cloned copy of the underlying warnings messages.

Specified by:
getWarnings in interface IMessageStore

merge

public void merge(IMessageStore other)
Description copied from interface: IMessageStore
Destructively insert the contents of the second message collection into this one.

Specified by:
merge in interface IMessageStore