package bench;
class BubbleSortAlgorithm
    extends SortAlgorithm
{
    public BubbleSortAlgorithm()
    {
        super("BubbleSortAlgorithm");
    }

    public final void performTest()
    {
        int length = a.length;

        for(int i = length; --i >= 0;)
        {
                for(int j = 0; j < i; j++)
                {
                    if(a[j] > a[j+1])
                    {
                       int T = a[j];

                       a[j]   = a[j+1];
                       a[j+1] = T;
                    }
                }
        }
    }
}
