adapforms.util
Class SortableItem<T>

java.lang.Object
  extended by adapforms.util.SortableItem<T>
Type Parameters:
T - Type of the values to be stored
All Implemented Interfaces:
java.lang.Comparable<SortableItem<T>>

public class SortableItem<T>
extends java.lang.Object
implements java.lang.Comparable<SortableItem<T>>

Class for linking a value with a sorting key. Lower keys mean earlier ordering.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
SortableItem(int sortKey, T value)
           
 
Method Summary
 int compareTo(SortableItem<T> o)
           
 int sortKey()
           
 T value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortableItem

public SortableItem(int sortKey,
                    T value)
Method Detail

sortKey

public int sortKey()

value

public T value()

compareTo

public int compareTo(SortableItem<T> o)
Specified by:
compareTo in interface java.lang.Comparable<SortableItem<T>>