public static <T> Optional<T> of(final T optionalValue) {   //NOPMD
        checkNotNull(optionalValue, "Optional value may not be null in method of");
        return new Optional<T>(optionalValue);
    }
public static < T > Optional < T > of ( final T optionalValue ) { checkNotNull ( optionalValue , "Optional value may not be null in method of" ) ; return new Optional < T > ( optionalValue ) ; }
Returns an Optional with the specified present non-null value.

@param <T>           the class of the value
@param optionalValue the value to be present, which must be non-null
@return an Optional with the value present