This method of the Sort Class is called when the sorting engine must compare two elements. Subclasses override this method in a container-specific manner.
protected int compare(int p, int q);
Returns an integer describing the relationship of the elements.
If Sort returns less than a 0, place element p before element q in the sort.
If Sort returns greater than 0, place element p after element q.
If Sort returns 0, elements p and q are equivelent.
p | The index of the first operand of the comparison. |
q | The index of the second operand of the comparison. |