public synchronized Iterator<RecordInfo> iterator(int sortIndex, boolean descending)
	   {
		   Iterator iter = null;
		   if(sortIndex<0)
			   iter = Arrays.asList(unsortedRecords.toArray()).iterator();
		   else
		   {
			   final List<RecordInfo>[] whichList=descending?reverseSorted:forwardSorted;
			   if((whichList == null)||(sortIndex<0)||(sortIndex>=whichList.length))
				   iter=empty.iterator();
			   else
			   synchronized(whichList)
			   {
				   if(whichList[sortIndex]!=null)
					   iter=whichList[sortIndex].iterator();
				   else
				   {
					   final IndexedRowMapComparator comparator=descending?reverseComparators[sortIndex]:forwardComparators[sortIndex];
					   final List<RecordInfo> newList = (List<RecordInfo>)unsortedRecords.clone();
					   Collections.sort(newList,comparator);
					   whichList[sortIndex]=newList;
					   iter=newList.iterator();
				   }
			   }
		   }
		   return iter;
	   }