magoffin.matt.ma2.util
Class AlbumSorter

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

public class AlbumSorter
extends java.lang.Object
implements java.util.Comparator<Album>

Comparator for Album 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 AlbumSorter.SortMode
          Sort mode.
 
Constructor Summary
AlbumSorter(AlbumSorter.SortMode mode, boolean reverse)
          Construct from a SortMode and reverse flag.
 
Method Summary
 int compare(Album o1, Album 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

AlbumSorter

public AlbumSorter(AlbumSorter.SortMode mode,
                   boolean reverse)
Construct from a SortMode and reverse flag.

Parameters:
mode - the sorting mode
reverse - flag indicating a reverse sort
Method Detail

compare

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