date - Java: Group arraylist records by derived attribute -


i have arraylist created input csv file, in calculations performed generate more columns afterwards printed csv file. in arraylist, 1 of attributes unix time stamp. record comprises of 7 different days. want group records day, if it's not in order, order groups time (the specifics, i.e. hours, minutes, seconds). so, input csv file, extracted unix timestamp using delimiter, e.g. 1442327884, used code retrieve day

java.util.date time = new java.util.date((long) timestamp * 1000); // gives result of tue sep 15 22:38:04 sgt 2015 string date = string.valueof(time.getdate());; // gives result of "15" 

a method used calculation grouping follows

map<string, list<string>> groups = data.stream().collect(collectors.groupingby(e -> e.split(",")[1])); 

how set groupby string date mentioned above?

you check out radix sort. kind of sorting you're looking for.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -