prog.utils
Class TitleSorter

java.lang.Object
  |
  +--prog.utils.TitleSorter
All Implemented Interfaces:
java.util.Comparator
Direct Known Subclasses:
CatLinkTitleSorter, LinkTitleSorter

public class TitleSorter
extends java.lang.Object
implements java.util.Comparator

This Comparator compares Strings by title. "Fish" would precede "A Zebra" because the "A " would be stripped from the String before sorting.


Constructor Summary
TitleSorter()
           
 
Method Summary
 int compare(java.lang.Object ob1, java.lang.Object ob2)
           
static java.lang.String getStrippedTitle(java.lang.String str)
           
 
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

TitleSorter

public TitleSorter()
Method Detail

compare

public int compare(java.lang.Object ob1,
                   java.lang.Object ob2)
Specified by:
compare in interface java.util.Comparator

getStrippedTitle

public static java.lang.String getStrippedTitle(java.lang.String str)