org.apache.lucene.util
Class SorterTemplate

java.lang.Object
  extended by org.apache.lucene.util.SorterTemplate

public abstract class SorterTemplate
extends Object

Borrowed from Cglib. Allows custom swap so that two arrays can be sorted at the same time.


Constructor Summary
SorterTemplate()
           
 
Method Summary
protected abstract  int compare(int i, int j)
           
protected  void mergeSort(int lo, int hi)
           
 void quickSort(int lo, int hi)
           
protected abstract  void swap(int i, int j)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SorterTemplate

public SorterTemplate()
Method Detail

swap

protected abstract void swap(int i,
                             int j)

compare

protected abstract int compare(int i,
                               int j)

quickSort

public void quickSort(int lo,
                      int hi)

mergeSort

protected void mergeSort(int lo,
                         int hi)


Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.