code: public void sortRowsForIndexByType(int index, DataType dataType)
  	{
  		Comparator<List<String>> comparator = null;
  		
  		switch(dataType)
  		{
  		
  			case Long : { comparator = (list1, list2) -> 
  				Long.valueOf(list1.get(0)).compareTo(Long.valueOf(list2.get(0))); 
  			   }
  			break;
  			default:
  				comparator = (list1, list2) -> 
  				list1.get(0).compareTo(list2.get(0));
  		}
  
  		sortRows(comparator);
  	}
docs: ------------------------------------------------