/*
 * Copyright (C) 2022 ScalAgent Distributed Technologies
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA.
 *
 * Initial developer(s): ScalAgent Distributed Technologies
 * Contributor(s): 
 */
package fr.dyade.aaa.agent;

public interface MessageComparator {
  /**
   * Compares the 2 messages for time ordering. 
   * Returns true if the first message is earlier than the second, false otherwise.
   * 
   * @param m1  The first message.
   * @param m2  The second message.
   * @return  true if the first message is earlier than the second, false otherwise.
   * @throws NullPointerException if an argument is null and this comparator does not permit null arguments
   */
  boolean isPrior(Message m1, Message m2);
}
