at.spardat.xma.mdl.table
Interface XMATableColumn.AtomComparator

Enclosing interface:
XMATableColumn

public static interface XMATableColumn.AtomComparator

This interace is used to implement a costum comparator for an XMATableColumn. AtomComparator#compare is to use like java.util.Comparator#compare(java.lang.Object, java.lang.Object). but the objects to compare are always of the type at.spardat.xma.mdl.Atom. For the sorting of an XMATableColumn the AtomComparator is always called with both arguments != null, so no compare null logic has to be implemented. The use of a costum comparator for XMATableColumns is optional. If no AtomComparator is set then the Atom's type natural ordering is used.

Since:
version_number

Method Summary
 int compare(Atom a1, Atom a2)
          Use this method to implement a costum comparator for XMATableColumns.
 

Method Detail

compare

public int compare(Atom a1,
                   Atom a2)
Use this method to implement a costum comparator for XMATableColumns. Used like java.util.Comparator#compare but instead of objects the arguments are of the type at.spardat.xma.mdl.Atom, as at the IWModelClients data is always stored as Atoms. Contrary to java.util.Comparator#compare you do not have to take care of null arguments!

See Also:
Comparator.compare(java.lang.Object, java.lang.Object)