public static Optional < EndedEvent > createEndedEvent ( Identification source ) { try { EndedEvent stopRequest = new EndedEvent ( source ) ; return Optional . of ( stopRequest ) ; } catch ( IllegalArgumentException e ) { return Optional . empty ( ) ; } }
creates a new EndedEvent