public static Optional < StartEvent > createStartEvent ( Identification source , boolean isUsingJava ) { try { StartEvent startEvent ; if ( isUsingJava ) { startEvent = new StartEvent ( source ) ; } else { startEvent = new StartEvent ( source , IS_USING_NON_JAVA_OUTPUT ) ; } return Optional . of ( startEvent ) ; } catch ( IllegalArgumentException e ) { return Optional . empty ( ) ; } }
creates a new StartEvent