public HashMap addEvent ( String date , boolean useTemp ) { HashMap ret = new HashMap ( ) ; if ( useTemp ) { ret . putAll ( template ) ; } else { ret . put ( "event" , eventType ) ; } ret . put ( "date" , date ) ; getInertIndex ( ret ) ; events . add ( next , ret ) ; return ret ; }
Add a new event into array with selected event type and input date .