Code example for ArrayList

Methods: add

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