Holger's
Java API

com.antelmann.net
Class URLSorter

java.lang.Object
  extended by com.antelmann.net.URLSorter
All Implemented Interfaces:
Comparator<URL>

public class URLSorter
extends Object
implements Comparator<URL>

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

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

Author:
Holger Antelmann

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

compare

public int compare(URL url1,
                   URL url2)
Specified by:
compare in interface Comparator<URL>


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads