Code example for TreeMap

Methods: entrySet

0
	/** 
	 * returns the entry set itself 
	 * @return Set<Map.Entry<Integer,Event>> set of events 
	 */ 
	public Set<Map.Entry<Integer,Event>> getEntrySet() {
		return events.entrySet();
	} 
 
	/** 
	 * Prints list of missions 
	 */ 
	@Override 
	public String toString() {
		StringBuilder builder = new StringBuilder();
		// get values 
		for(Map.Entry<Integer,Event> entry : events.entrySet()) {
			int time = entry.getKey();
			builder.append(EventList.formatTime(time));
			builder.append(" - ");
			builder.append(entry.getValue().getDescription(time));
			builder.append('\n');