/* We loop once through the rawMxRecords, finding the lowest priority
* greater than priorListPriority, and collecting all the hostnames
* with that priority into equiPriorityList.
*/
for (int i = 0; i < mxRecords.length; i++) {
MXRecord thisRecord = (MXRecord)mxRecords[i];
int thisRecordPriority = thisRecord.getPriority();
if (thisRecordPriority > priorListPriority) {
if (thisRecordPriority < leastPriorityFound) {
equiPriorityList.clear();
leastPriorityFound = thisRecordPriority;
equiPriorityList.add(thisRecord.getTarget().toString());
} else if (thisRecordPriority == leastPriorityFound) {
equiPriorityList.add(thisRecord.getTarget().toString());
}
}
}
priorListPriority = leastPriorityFound;
}