# Class Sorter.BubbleSorter

public class BubbleSorter
extends Sorter.ASorter

A concrete sorter that uses the Bubble Sort technique.

##

BubbleSorter (AOrder)
  The constructor for this class

##

join (Object[], int, int, int)
  Joins sorted A[lo:s-1] and sorted A[s:hi] into A[lo:hi]
split (Object[], int, int)
  Splits A[lo:hi] into A[lo:s-1] and A[s:hi] where s is the returned value of this function

##

BubbleSorter

    public  BubbleSorter(AOrder iCompareOp)

  The constructor for this class.

  Parameters:
    iCompareOp - The comparison strategy to use in the sorting.

##

split

    protected int split(Object[] A, int lo, int hi)

  Splits A[lo:hi] into A[lo:s-1] and A[s:hi] where s is the returned value of this function. This method bubbles the "smallest" value to the lo end and splits it off.

  Parameters:
    A - the array A[lo:hi] to be sorted.
    lo - the low index of A.
    hi - the high index of A.
  Returns:
    lo+1 always.

join

    protected void join(Object[] A, int lo, int s, int hi)

  Joins sorted A[lo:s-1] and sorted A[s:hi] into A[lo:hi]. This method does nothing. The sub-arrays are already in proper order.

  Parameters:
    A - A[lo:s-1] and A[s:hi] are sorted.
    lo - the low index of A.
    s -
    hi - the high index of A.