net.sf.jsort.sort
Class AbstractSort

java.lang.Object
  extended by net.sf.jsort.sort.AbstractSort
All Implemented Interfaces:
CompareSort, SortAlgorithm
Direct Known Subclasses:
HeapSort, InsertSort, MergeSort, QuickSort

public abstract class AbstractSort
extends java.lang.Object
implements CompareSort

This is the base for all comparison based sorting algorithms.

Author:
Domingos Creado

Constructor Summary
AbstractSort()
           
 
Method Summary
 void sort(java.util.List list)
          Sort the list using it's natural order (i.e.
 void sort(java.util.List list, java.util.Comparator comparator)
          Sort the list using the specified Comparator
 void sort(java.util.List list, java.util.Comparator comparator, int start, int end)
          Sort a specific range of the list using the comparator
 void sort(java.util.List list, int start, int end)
          Sort a specific range of the list.
 void sort(java.lang.Object[] list)
          Sort the list using it's natural order (i.e.
 void sort(java.lang.Object[] list, java.util.Comparator comparator)
          Sort the list using the specified Comparator
abstract  void sort(java.lang.Object[] list, java.util.Comparator comparator, int start, int end)
          Sort a specific range of the list, using the specified comparator.
 void sort(java.lang.Object[] list, int start, int end)
          Sort a specific range of the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSort

public AbstractSort()
Method Detail

sort

public final void sort(java.util.List list)
Description copied from interface: SortAlgorithm
Sort the list using it's natural order (i.e. instance of Comparable)

Specified by:
sort in interface SortAlgorithm
Parameters:
list - to be sort
See Also:
Comparable

sort

public final void sort(java.util.List list,
                       java.util.Comparator comparator)
Description copied from interface: CompareSort
Sort the list using the specified Comparator

Specified by:
sort in interface CompareSort
Parameters:
list - to be sort

sort

public final void sort(java.util.List list,
                       int start,
                       int end)
Description copied from interface: SortAlgorithm
Sort a specific range of the list.

Specified by:
sort in interface SortAlgorithm
Parameters:
list - to be sort

sort

public final void sort(java.util.List list,
                       java.util.Comparator comparator,
                       int start,
                       int end)
Description copied from interface: CompareSort
Sort a specific range of the list using the comparator

Specified by:
sort in interface CompareSort
Parameters:
list - to be sort

sort

public final void sort(java.lang.Object[] list)
Description copied from interface: SortAlgorithm
Sort the list using it's natural order (i.e. instance of Comparable)

Specified by:
sort in interface SortAlgorithm
Parameters:
list - to be sort
See Also:
Comparable

sort

public final void sort(java.lang.Object[] list,
                       java.util.Comparator comparator)
Description copied from interface: CompareSort
Sort the list using the specified Comparator

Specified by:
sort in interface CompareSort
Parameters:
list - to be sort

sort

public final void sort(java.lang.Object[] list,
                       int start,
                       int end)
Description copied from interface: SortAlgorithm
Sort a specific range of the list.

Specified by:
sort in interface SortAlgorithm
Parameters:
list - to be sort

sort

public abstract void sort(java.lang.Object[] list,
                          java.util.Comparator comparator,
                          int start,
                          int end)
Description copied from interface: CompareSort
Sort a specific range of the list, using the specified comparator.

Specified by:
sort in interface CompareSort
Parameters:
list - to be sort


Copyright © 2005-2008 Domingos Creado. All Rights Reserved.