src/main/java/org/intellimate/izou/sdk/frameworks/permanentSoundOutput/events/StartEvent.java
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();
        }
    }
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();
        }
    }
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
@param source the caller
@param isUsingJava true if using java, false if not (and for example a C-library)
@return the optional StartMusicRequest
creates a new StartEvent