public Optional<String> getData() {
        if (data == null) {
            return Optional.empty();
        } else {
            return Optional.of(data);
        }
    }
public Optional<String> getData() {
        if (data == null) {
            return Optional.empty();
        } else {
            return Optional.of(data);
        }
    }
public Optional < String > getData ( ) { if ( data == null ) { return Optional . empty ( ) ; } else { return Optional . of ( data ) ; } }
returns the associated data (not really specified, specified by implementation)
@return the optional data-element
returns the associated data ( not really specified specified by implementation )