org.jscience.net
Class URLSorter

java.lang.Object
  extended by org.jscience.net.URLSorter
All Implemented Interfaces:
java.util.Comparator<java.net.URL>

public class URLSorter
extends java.lang.Object
implements java.util.Comparator<java.net.URL>

A simple convenience class that sorts URLs by their external form lexicographically.

Note that this implementation is inconsistent to the equals() method.


Constructor Summary
URLSorter()
           
 
Method Summary
 int compare(java.net.URL url1, java.net.URL url2)
          DOCUMENT ME!
static java.net.URL[] sort(java.net.URL[] urlList)
          DOCUMENT ME!
 
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

URLSorter

public URLSorter()
Method Detail

sort

public static java.net.URL[] sort(java.net.URL[] urlList)
DOCUMENT ME!

Parameters:
urlList - DOCUMENT ME!
Returns:
DOCUMENT ME!

compare

public int compare(java.net.URL url1,
                   java.net.URL url2)
DOCUMENT ME!

Specified by:
compare in interface java.util.Comparator<java.net.URL>
Parameters:
url1 - DOCUMENT ME!
url2 - DOCUMENT ME!
Returns:
DOCUMENT ME!