Code example for TreeMap

Methods: putAll

0
	 */ 
	private TreeMap<GregorianCalendar, String> getCompositeSchedule(
		String busStop)
	{ 
		TreeMap<GregorianCalendar, String> compositeSchedule = 
			new TreeMap<GregorianCalendar, String>();
		compositeSchedule.putAll(snapshotYesterday.getBusStopSched(busStop));
		compositeSchedule.putAll(snapshotToday.getBusStopSched(busStop));
		compositeSchedule.putAll(snapshotTomorrow.getBusStopSched(busStop));
		return compositeSchedule;
	} 
 
	/** 
	 * Find the key occurs after a certain number of bus times from the current 
	 * time. 
	 * 
 	 * @param compositeSchedule The schedule to search for the times. 
	 * @param currentTime What the current time is. 
	 * @param numberPast How far past the current time to go. 
	 * @return A key that points in compositeSchedule numberPast times after the 
	 * current time.