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 FiFo sorting mechanism for messages. <br>
20   * <br>
21   * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
22   * Delft, the Netherlands. All rights reserved.
23   * 
24   * See for project information <a href="http://www.simulation.tudelft.nl/">
25   * www.simulation.tudelft.nl</a>.
26   * 
27   * The source code and binary code of this software is proprietary information 
28   * of Delft University of Technology.
29   * 
30   * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
31   * Jacobs </a>
32   * @version $$Revision: 1.3 $$ $$Date: 2005/04/08 11:29:12 $$
33   */
34  public class FiFo extends FieldComparator
35  {
36  	/*** the serial version uid */
37  	private static final long serialVersionUID = 12L;
38  
39      /*** the fieldName used to check order */
40      public static final String FIELDNAME = "id"; //Message.id is used
41  
42      /***
43       * constructs a new FiFo on the id-field of a message
44       */
45      public FiFo()
46      {
47          super(FiFo.FIELDNAME);
48      }
49  
50      /***
51       * constructs a new FiFo
52       * 
53       * @param next the next comparator to use
54       */
55      public FiFo(final Comparator next)
56      {
57          super(FiFo.FIELDNAME, next);
58      }
59  }