if( a >= b)
{
return;
}
MajorRecord pivot = data[b];
int left = a;
int right = b - 1;
while(left <= right)
{
while(
left <= right
&&
data[left].getEDID().compareToIgnoreCase(pivot.getEDID()) <= 0
)
{
++left;
}
while(
right >= left
&&
data[right].getEDID().compareToIgnoreCase(pivot.getEDID()) >= 0
)
{
--right;
}
if(left <= right)
{
MajorRecord tmp = data[left];
data[left] = data[right];
data[right] = tmp;
}
}
MajorRecord tmp = data[left];
data[left] = data[b];
data[b] = tmp;
sortByEditorID( data, a, (left-1) );
sortByEditorID( data, (left+1), b );