pbs-middleware-client/src/main/java/cz/muni/ll/middleware/client/jobs/domain/submitRequest/SubmitJobBuilder.java
/**
     * Set Qsub arguments.
     *
     * @param       arguments  qsub arguments collection
     * @return      a reference to this object.
     * @exception   IllegalArgumentException in case {@code arguments} is {@code null}
     * @exception   IllegalArgumentException in case {@code arguments} contain {@code null}
     * @exception   IllegalArgumentException in case {@code arguments} contain blank string
     */
Set Qsub arguments.
@param       arguments  qsub arguments collection
@return      a reference to this object.
@exception   IllegalArgumentException in case  arguments is  null
@exception   IllegalArgumentException in case  arguments contain  null
@exception   IllegalArgumentException in case  arguments contain blank string
Set Qsub arguments . @param arguments qsub arguments collection @return a reference to this object . @exception IllegalArgumentException in case arguments is null @exception IllegalArgumentException in case arguments contain null @exception IllegalArgumentException in case arguments contain blank string
public SubmitJobBuilder arguments(List<String> arguments) {
        if (arguments == null) {
            throw new IllegalArgumentException("arguments can not be null");
        }
        if(arguments.stream().anyMatch(Objects::isNull)) {
            throw new IllegalArgumentException("arguments can not contain null");
        }
        if(arguments.stream().map(arg -> arg.replace(" ", "")).anyMatch(String::isEmpty)) {
            throw new IllegalArgumentException("arguments can not contain empty string");
        }
        if (this.arguments == null) {
            this.arguments = new LinkedList<>();
        }
        this.arguments.addAll(arguments);
        return this;
    }
public SubmitJobBuilder arguments ( List < String > arguments ) { if ( arguments == null ) { throw new IllegalArgumentException ( "arguments can not be null" ) ; } if ( arguments . stream ( ) . anyMatch ( Objects :: isNull ) ) { throw new IllegalArgumentException ( "arguments can not contain null" ) ; } if ( arguments . stream ( ) . map ( arg -> arg . replace ( " " , "" ) ) . anyMatch ( String :: isEmpty ) ) { throw new IllegalArgumentException ( "arguments can not contain empty string" ) ; } if ( this . arguments == null ) { this . arguments = new LinkedList < > ( ) ; } this . arguments . addAll ( arguments ) ; return this ; }
Set Qsub arguments.
Set Qsub arguments .