// Path: src/main/java/org/carrot2/labs/smartsprites/message/Message.java
// public enum MessageLevel
// {
//     /**
//      * Information message, can be ignored.
//      */
//     INFO(1),
// 
//     /**
//      * Notice messages related to IE6 problems.
//      */
//     IE6NOTICE(2),
// 
//     /**
//      * Notice messages related to deprecated features.
//      */
//     DEPRECATION(2),
// 
//     /**
//      * Warning messages, ignoring can lead to the converted designs looking broken.
//      */
//     WARN(4),
// 
//     /**
//      * Error messages, SmartSpricess cannot perform processing.
//      */
//     ERROR(5),
// 
//     /**
//      * Status messages displayed at the end of processing.
//      */
//     STATUS(6);
// 
//     /** Numeric level for comparisons */
//     private final int level;
// 
//     private MessageLevel(int level)
//     {
//         this.level = level;
//     }
// 
//     public static final Comparator<MessageLevel> COMPARATOR = new Comparator<MessageLevel>()
//     {
//         public int compare(MessageLevel levelA, MessageLevel levelB)
//         {
//             return levelA.level - levelB.level;
//         }
//     };
// 
// }


import org.carrot2.labs.smartsprites.message.Message.MessageLevel;
package org.carrot2.labs.smartsprites.message;


/**
 * Counts the number of messages logged with different levels.
 */
public class LevelCounterMessageSink implements MessageSink
{
    /** Number of info messages */
    private int infoCount = 0;

    /** Number of warning messages */
    private int warnCount = 0;

    public void add(Message message)
    {
// Path: src/main/java/org/carrot2/labs/smartsprites/message/Message.java
// public enum MessageLevel
// {
//     /**
//      * Information message, can be ignored.
//      */
//     INFO(1),
// 
//     /**
//      * Notice messages related to IE6 problems.
//      */
//     IE6NOTICE(2),
// 
//     /**
//      * Notice messages related to deprecated features.
//      */
//     DEPRECATION(2),
// 
//     /**
//      * Warning messages, ignoring can lead to the converted designs looking broken.
//      */
//     WARN(4),
// 
//     /**
//      * Error messages, SmartSpricess cannot perform processing.
//      */
//     ERROR(5),
// 
//     /**
//      * Status messages displayed at the end of processing.
//      */
//     STATUS(6);
// 
//     /** Numeric level for comparisons */
//     private final int level;
// 
//     private MessageLevel(int level)
//     {
//         this.level = level;
//     }
// 
//     public static final Comparator<MessageLevel> COMPARATOR = new Comparator<MessageLevel>()
//     {
//         public int compare(MessageLevel levelA, MessageLevel levelB)
//         {
//             return levelA.level - levelB.level;
//         }
//     };
// 
// }


// Path: src/main/java/org/carrot2/labs/smartsprites/message/LevelCounterMessageSink.java
import org.carrot2.labs.smartsprites.message.Message.MessageLevel;

package org.carrot2.labs.smartsprites.message;


/**
 * Counts the number of messages logged with different levels.
 */
public class LevelCounterMessageSink implements MessageSink
{
    /** Number of info messages */
    private int infoCount = 0;

    /** Number of warning messages */
    private int warnCount = 0;

    public void add(Message message)
    {
        if (MessageLevel.INFO.equals(message.level))