org.apache.pdfbox.util
Class QuickSort

java.lang.Object
  extended by org.apache.pdfbox.util.QuickSort

public class QuickSort
extends Object

see http://de.wikipedia.org/wiki/Quicksort.

Author:
UWe Pachler

Method Summary
static
<T extends Comparable>
void
sort(List<T> list)
          Sorts the given list using compareTo as comparator.
static
<T> void
sort(List<T> list, Comparator<T> cmp)
          Sorts the given list using the given comparator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sort

public static <T> void sort(List<T> list,
                            Comparator<T> cmp)
Sorts the given list using the given comparator.

Parameters:
list - list to be sorted
cmp - comparator used to compare the object swithin the list

sort

public static <T extends Comparable> void sort(List<T> list)
Sorts the given list using compareTo as comparator.

Parameters:
list - list to be sorted


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.