sk.uniba.euromath.gene.messages
Class Messages

java.lang.Object
  extended by sk.uniba.euromath.gene.messages.Messages
All Implemented Interfaces:
Iterable<Message>

public final class Messages
extends Object
implements Iterable<Message>

A list of messages.

Author:
Martin Vysny

Constructor Summary
Messages(boolean log)
          Constructs an empty list of messages.
 
Method Summary
 void add(Message message)
          Adds new message.
 MessageSeverityEnum getSeverity()
          Returns highest severity of all messages.
 boolean hasErrors()
          Returns true if contains some error messages.
 boolean isEmpty()
          Checks if there are messages registered.
 Iterator<Message> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages(boolean log)
Constructs an empty list of messages.

Parameters:
log - if true then each added message is logged in the Eclipse log.
Method Detail

iterator

public Iterator<Message> iterator()
Specified by:
iterator in interface Iterable<Message>

getSeverity

public MessageSeverityEnum getSeverity()
Returns highest severity of all messages.

Returns:
highest severity, or null if there are no messages.

hasErrors

public boolean hasErrors()
Returns true if contains some error messages.

Returns:
true if there are some error messages, false otherwise.

add

public void add(Message message)
Adds new message.

Parameters:
message - the message to add.

isEmpty

public boolean isEmpty()
Checks if there are messages registered.

Returns:
true if at least one message is present.


Copyright 2003-2003-2006 null. All Rights Reserved.