Hi All,
I need to sort my Vector by amount in Descending order. How would I go about this? I have account sorting Asc, but within account the amount has to be in descending order. Any help would be most appreciated.
TIA,
Tim
I need to sort my Vector by amount in Descending order. How would I go about this? I have account sorting Asc, but within account the amount has to be in descending order. Any help would be most appreciated.
Code:
public void AmountSorter(Vector _wireRecords) {
LogManager.sysLog(5, this, "Entering RecordSorter Constructor()");
String oldAcct = new String();
Vector holdInfo = new Vector();
for(int i = 0; _wireRecords.size() > i; i++) {
WireRecord wr = (WireRecord)_wireRecords.elementAt(i);
holdInfo.addElement(wr.getAccountNum());
holdInfo.addElement(wr.getAmount());
}
System.out.println("info... " + holdInfo);
LogManager.sysLog(5, this, "Exiting RecordSorter Constructor()");
}//End of Method AmountSorter...
TIA,
Tim