View Javadoc

1   /*
2    * @(#) FiFo.java Feb 18, 2004
3    * 
4    * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
5    * Delft, the Netherlands. All rights reserved.
6    * 
7    * See for project information <a href="http://www.simulation.tudelft.nl/">
8    * www.simulation.tudelft.nl </a>.
9    * 
10   * The source code and binary code of this software is proprietary information
11   * of Delft University of Technology.
12   */
13  
14  package nl.tudelft.simulation.messaging.comparators;
15  
16  import java.util.Comparator;
17  
18  /***
19   * A priority-based comparator to be able to compare messages based on fields.
20   * <br>
21   * <br>
22   * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
23   * Delft, the Netherlands. All rights reserved.
24   * 
25   * See for project information <a href="http://www.simulation.tudelft.nl/">
26   * www.simulation.tudelft.nl </a>.
27   * 
28   * The source code and binary code of this software is proprietary information
29   * of Delft University of Technology.
30   * 
31   * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
32   *         Jacobs </a>
33   * @version $$Revision: 1.3 $$ $$Date: 2005/04/08 11:29:12 $$
34   */
35  public class PriorityCompare extends FieldComparator
36  {
37  	/*** the serial version uid */
38  	private static final long serialVersionUID = 12L;
39  
40  	/*** the fieldName used to check priority */
41  	public static final String FIELDNAME = "priority"; // Message.priority
42  
43  	/***
44  	 * constructs a new PriorityCompare on the id-field of a message
45  	 */
46  	public PriorityCompare()
47  	{
48  		super(PriorityCompare.FIELDNAME);
49  	}
50  
51  	/***
52  	 * constructs a new PriorityCompare
53  	 * 
54  	 * @param next the next comparator to use
55  	 */
56  	public PriorityCompare(final Comparator next)
57  	{
58  		super(PriorityCompare.FIELDNAME, next);
59  	}
60  }