Oracle Data-aware Controls Reference

oracle.dacf.util
Class BiDirBubbleSort

java.lang.Object
  extended byoracle.dacf.util.AbstractSort
      extended byoracle.dacf.util.BiDirBubbleSort
All Implemented Interfaces:
Sortter

public class BiDirBubbleSort
extends AbstractSort

This class implements a generic verison of a bidirectional BubbleSort. You will need to define a comparison method using the Compare interface and set the comparer before calling sort. If this is not done, then an IllegalArgumentException will be thrown. A default swapper is implemented so that it is not necessary to define an instance of the Swapper interface.

See Also:
Compare, Swapper, AbstractSort

Field Summary
 
Fields inherited from class oracle.dacf.util.AbstractSort
comparer, swapper
 
Constructor Summary
BiDirBubbleSort()
           
 
Method Summary
 void sort(java.lang.Object[] a)
          Sorts the items.
 
Methods inherited from class oracle.dacf.util.AbstractSort
getComparer, getSwapper, setComparer, setSwapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BiDirBubbleSort

public BiDirBubbleSort()
Method Detail

sort

public void sort(java.lang.Object[] a)
Sorts the items.

Specified by:
sort in interface Sortter
Specified by:
sort in class AbstractSort
Parameters:
a - the array of objects to be sorted.
Throws:
java.lang.IllegalArgumentException - if the comparer is not defined

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.