Code example for ArrayList

Methods: add

0
    // IFloodlightModule 
     
    @Override 
    public Collection<Class<? extends IFloodlightService>> getModuleServices() { 
        Collection<Class<? extends IFloodlightService>> l =  
                new ArrayList<Class<? extends IFloodlightService>>(); 
        l.add(IThreadPoolService.class); 
        return l; 
    } 
 
    @Override 
    public Map<Class<? extends IFloodlightService>, IFloodlightService> 
            getServiceImpls() { 
        Map<Class<? extends IFloodlightService>, 
            IFloodlightService> m =  
                new HashMap<Class<? extends IFloodlightService>, 
                    IFloodlightService>(); 
        m.put(IThreadPoolService.class, this); 
        // We are the class that implements the service 
        return m; 
    }