- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Oct 2009 12:50:18 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util In directory hutz:/tmp/cvs-serv29976/src/org/w3c/unicorn/util Modified Files: MessageList.java Log Message: added methods to check if the messageList contains an info, an error, or a warning Index: MessageList.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/MessageList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- MessageList.java 6 Oct 2009 08:16:59 -0000 1.1 +++ MessageList.java 7 Oct 2009 12:50:16 -0000 1.2 @@ -12,6 +12,27 @@ this.lang = Property.get("DEFAULT_LANGUAGE"); } + public boolean hasInfo() { + for (Message m : this) + if (m.getLevel() == Message.INFO) + return true; + return false; + } + + public boolean hasWarning() { + for (Message m : this) + if (m.getLevel() == Message.WARNING) + return true; + return false; + } + + public boolean hasErrors() { + for (Message m : this) + if (m.getLevel() == Message.ERROR) + return true; + return false; + } + public MessageList(String lang) { this.lang = lang; }
Received on Wednesday, 7 October 2009 12:50:21 UTC