What I tried initially
Map<String, List<Date>> subscriberCreatedDateSet = data.stream().collect(Collectors
.groupingBy(SubscriberActivityAggData::getSubscriberAddress
, Collectors.mapping(SubscriberActivityAggData::getEventTime, Collectors.toList())));
and then
Map<String, Date> subscriberCreatedDate = subscriberCreatedDateSet.entrySet().stream()
.map(item->Collections.min(item.getValue()))
.collect(Collectors.mapping());
this is incomplete because I could not find a way to correctly do it.
is there a way to do it properly? or should I loops and o it