public boolean addVerb ( String action , Date dateStart , Date dateEnd , String [ ] description , String comment ) { Map < String , Object > container = new HashMap < String , Object > ( ) ; if ( action != null ) { container . put ( "action" , action ) ; } else { return false ; } if ( dateStart != null && dateEnd != null ) { container . put ( "date" , df . format ( dateStart ) + "/" + df . format ( dateEnd ) ) ; } else if ( dateStart != null ) { container . put ( "date" , df . format ( dateStart ) ) ; } if ( description != null && description . length > 0 ) { container . put ( "description" , description ) ; } if ( comment != null ) { container . put ( "comment" , comment ) ; } return addChild ( "verb" , container , null ) ; }
Add a verb object to this activity