pbs-middleware-client/src/main/java/cz/muni/ll/middleware/client/jobs/domain/submitRequest/SubmitJobBuilder.java
/**
     * Associates the specified variable value with the specified variable key in variables map.
     * Variables are used for building QSUB command. Optional.
     *
     * @param       key variable key with which the specified variable value is to be associated
     * @param       value variable value to be associated with the specified variable key
     * @return      a reference to this object.
     * @exception   IllegalArgumentException in case {@code key} is {@code null}
     * @exception   IllegalArgumentException in case {@code value} is {@code null}
     * @exception   IllegalArgumentException in case {@code key} is blank string
     * @exception   IllegalArgumentException in case {@code value} is blank string
     */
Associates the specified variable value with the specified variable key in variables map.
Variables are used for building QSUB command. Optional.

@param       key variable key with which the specified variable value is to be associated
@param       value variable value to be associated with the specified variable key
@return      a reference to this object.
@exception   IllegalArgumentException in case  key is  null
@exception   IllegalArgumentException in case  value is  null
@exception   IllegalArgumentException in case  key is blank string
@exception   IllegalArgumentException in case  value is blank string
Associates the specified variable value with the specified variable key in variables map . Variables are used for building QSUB command . Optional . @param key variable key with which the specified variable value is to be associated @param value variable value to be associated with the specified variable key @return a reference to this object . @exception IllegalArgumentException in case key is null @exception IllegalArgumentException in case value is null @exception IllegalArgumentException in case key is blank string @exception IllegalArgumentException in case value is blank string
public SubmitJobBuilder variable(String key, String value) {
        if (key == null) {
            throw new IllegalArgumentException("variable key can not be null");
        }
        if (value == null) {
            throw new IllegalArgumentException("variable value can not be null");
        }
        if (key.replace(" ", "").isEmpty()) {
            throw new IllegalArgumentException("variable key can not be empty string");
        }
        if (value.replace(" ", "").isEmpty()) {
            throw new IllegalArgumentException("variable value can not be empty string");
        }
        if (this.variables == null) {
            this.variables = new HashMap<>();
        }
        variables.put(key, value);
        return this;
    }
public SubmitJobBuilder variable ( String key , String value ) { if ( key == null ) { throw new IllegalArgumentException ( "variable key can not be null" ) ; } if ( value == null ) { throw new IllegalArgumentException ( "variable value can not be null" ) ; } if ( key . replace ( " " , "" ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "variable key can not be empty string" ) ; } if ( value . replace ( " " , "" ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "variable value can not be empty string" ) ; } if ( this . variables == null ) { this . variables = new HashMap < > ( ) ; } variables . put ( key , value ) ; return this ; }
Associates the specified variable value with the specified variable key in variables map.
Associates the specified variable value with the specified variable key in variables map .