How to put HashMap into different elements with same key

You can make a wrapper class for the data structure such as

public class DateWrapper{
    private int a;
    private int b;
    private int c;
    private Date date;

    public DateWrapper(int a, int b, int c, Date date){
        this.a = a;
        this.b = b;
        this.a = c; = date;

    // getters and setters

and then just make a Map<String, DateWrapper>

this way of solving data structure of multiple things that are connected allows to manage setters, and add in more values easely

Browse More Popular Posts

Leave a Comment