the filtering issue in a map with the stream. So basically I have a Map of tweet objects. The objects have LocalDate as attribute which I implemented for example like this: LocalDate.parse("2021-10-11"). Among with other attributes. Now my goal is to iterate through the map and filter a certain date with the method isbefore(). I can't find a way to get it work on a map. I could convert the map to an arraylist/list but it is not the part of the task. Basically I have to search for tweets that have been tweeted before a certain date and have more than 20 retweets and are sorted by popularity. Is it possible to chain all this filters in one go? Any help is greatly appreciated.
maybe you nested HashMaps or HashMap and Map like:- HashMap<Date, Map<Integer, String>> hashMap = new HashMap<>(); idk what's generic of your "popularity", I assume Integer and idk popularity of your tweet I assume String
Обсуждают сегодня