Code example for SortedMap

Methods: isEmptyfirstKey

0
    	if(events.containsKey(time)) {
    		return time;
    	} 
    	 
    	SortedMap<Integer, Event> map = events.tailMap(time);    	
    	return map.isEmpty() ? null : map.firstKey();  
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE