Code example for GregorianCalendar

Methods: clone

0
	 * 
 	 * @return The GregorianCalendar that should be as the current time. 
	 */ 
	public static GregorianCalendar getCalendarInstance(){
		if(useCustomInstance){
			return (GregorianCalendar)instanceToUse.clone();
		} 
		return (GregorianCalendar)GregorianCalendar.getInstance();
	} 
 
	/** 
	 * Retrieve the next time a Bus will come for a particular stop. 
	 * 
	 * @param busStop The bustop for which the next time is desired. 
	 * @return A Map.Entry whose value is a string describing the next 
	 * times a bus will come at the given stop, and whose key is a  
	 * GregorianCalendar representing when the next bus will come. 
	 */ 
	public Map.Entry getNextTime(String busStop){
		if(busStop == null ||
			busStop.equals(res.getString(R.string.unknown_stop)))