KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > theme > Item


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.server.theme;
10
11 import org.jboss.portal.server.output.FragmentResult;
12
13 /**
14  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
15  * @version $Revision: 1.2 $
16  */

17 public class Item implements Comparable JavaDoc
18 {
19
20    private final int ordering;
21    private final FragmentResult fragment;
22
23    public Item(int ordering, FragmentResult fragment)
24    {
25       this.ordering = ordering;
26       this.fragment = fragment;
27    }
28
29    public int getOrdering()
30    {
31       return ordering;
32    }
33
34    public FragmentResult getFragment()
35    {
36       return fragment;
37    }
38
39    public int compareTo(Object JavaDoc o)
40    {
41       return ordering - ((Item)o).ordering;
42    }
43 }
44
Popular Tags