Code example for Map

Methods: get, put, remove

0
    	// remove/add to headers array 
    	this.headers.remove(oldTitle);
    	this.headers.insert(title, section);
    	 
    	// remove/add to section map 
    	Adapter adapter = this.sections.get(oldTitle);
    	this.sections.remove(oldTitle);
    	this.sections.put(title, adapter);
    } 
     
    public Object getItem(int position) {  
        for(int i = 0; i < headers.getCount(); i++) {
        	String section = headers.getItem(i);
            Adapter adapter = sections.get(section);
             
            // ignore empty sections 
            if(adapter.getCount() > 0)
            { 
                int size = adapter.getCount() + 1;  
                 
                // check if position inside this section