// Decompiled by DJ v2.6.6.51 Copyright 2000 Atanas Neshkov  Date: 10/2/2001 11:00:59
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   com/macromedia/generator/utils/Comparer

package com.macromedia.generator.utils;

import java.io.PrintStream;
import java.util.Vector;

public class Comparer
{

    public Comparer()
    {
    }

    private void _mth0277(Object aobj[])
    {
        int i = aobj.length;
        for(int j = 1; j < i; j++)
            if(compare(aobj[j - 1], aobj[j]) > 0)
            {
                System.out.println("***** SORT ERROR *****");
                return;
            }

    }

    public void Sort(Vector vector)
    {
        int i = vector.size();
        if(i < 2)
            return;
        Object aobj[] = new Object[i];
        for(int j = 0; j < i; j++)
            aobj[j] = vector.elementAt(j);

        Sort(aobj);
        vector.removeAllElements();
        for(int k = 0; k < i; k++)
            vector.addElement(aobj[k]);

    }

    public void Sort(Object aobj[])
    {
        int i = aobj.length;
        for(int j = 0; j < i;)
        {
            int k = j + 1;
            boolean flag = false;
            Object obj = aobj[j];
            while(k < i && !flag) 
                if(compare(obj, aobj[k]) > 0)
                    flag = true;
                else
                    k++;
            if(flag)
            {
                Object obj1 = aobj[j];
                aobj[j] = aobj[k];
                aobj[k] = obj1;
            } else
            {
                j++;
            }
        }

        _mth0277(aobj);
    }

    public int compare(Object obj, Object obj1)
    {
        return 0;
    }

    public boolean equals(Object obj)
    {
        return false;
    }
}