magoffin.matt.ma2.util
Class MediaItemSorter

java.lang.Object
  extended by magoffin.matt.ma2.util.MediaItemSorter
All Implemented Interfaces:
java.util.Comparator<MediaItem>

public class MediaItemSorter
extends java.lang.Object
implements java.util.Comparator<MediaItem>

Comparator for MediaItem objects.

Version:
$Revision: 43 $ $Date: 2007-10-21 11:10:01 +1300 (Sun, 21 Oct 2007) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Nested Class Summary
static class MediaItemSorter.SortMode
          Sort mode.
 
Constructor Summary
MediaItemSorter()
          Default constructor.
MediaItemSorter(int modeFlag)
          Construct with a SortMode mode flag.
MediaItemSorter(MediaItemSorter.SortMode mode)
          Construct with a SortMode.
 
Method Summary
 int compare(MediaItem o1, MediaItem o2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

MediaItemSorter

public MediaItemSorter()
Default constructor.


MediaItemSorter

public MediaItemSorter(MediaItemSorter.SortMode mode)
Construct with a SortMode.

Parameters:
mode - the mode

MediaItemSorter

public MediaItemSorter(int modeFlag)
Construct with a SortMode mode flag.

Parameters:
modeFlag - the mode flag
Method Detail

compare

public int compare(MediaItem o1,
                   MediaItem o2)
Specified by:
compare in interface java.util.Comparator<MediaItem>