how to make use of hashmap in following code. : how do i make use of hashmap in this code.i have rosters that hold ArrayList of students. i know hashmap use key and value pair, but i'm confuse on what would be my key and value if i use hashmap in the following classes that use arraylist. 
            
                this is my modify class where i make some modificaton on basis of user input that i get in may main class. 
            
                public class modify{
            ArrayList<Roster> rList;
            
            public modify{
             rList = new ArrayList<Roster>();
            }
    public void addRoster(){
            System.out.println("Enter name for roster: ");
            String name = newObj.nextLine();
            //Teacher t = new Teacher().addTeacher();
            Student s = new Student().addStudent();
            Roster addR = new Roster(s, name, 0);
            rList.add(addR);    
            System.out.println("New Roster Created: ");
            
        }//end of addRoster
            /*
            code
            */
            
            }//end of class
            
            
            
            
            this is my roster class. it hold the arralist of students.
    
    
    
    
            public class Roster{
            
                 int id;
                String name;
                List<Student> students;
        
            public Roster(Student s, String name, int id){
            
                    this.students = new ArrayList<Student>();
                    this.students.add(s);
                    this.id = ranObj.rand();
                    this.name = name;
                }//constructor
            }//end of roster
            
            
            this is my student class
        
        
        
        
            
            public class Student {
             private int studentId;
            public Student(String firstName, String lastName, int age) {
                super( firstName, lastName, age);
                this.studentId = ranObj.rand();
            }
        public  String toString(){
                return String.format("Student:\n" +
                        " Id = %d\n" +
                        " Age = %d\n" +
                        " firstName = %s\n" +
                        " lastName = %s\n\n" +
                        " ",getStudentId(),super.getAge(), super.getFirstName(),super.getLastName());
            }// end of tostring class
            
            }//end of student 