title: How to write properly an if statement in regards to a BooleanParameter in Jenkins pipeline Jenkinsfile?
body: <p>I'm setting a Jenkins pipeline Jenkinsfile and I'd like to check if a booleanparameter is set.</p>
  
  <p>Here's the relevant portion of the file:</p>
  
  <pre><code>node ("master") {
          stage 'Setup' (
                  [[$class: 'BooleanParameterValue', name: 'BUILD_SNAPSHOT', value: 'Boolean.valueOf(BUILD_SNAPSHOT)']],
  </code></pre>
  
  <p>As I understand, that is the way to access the booleanparameter but I'm not sure how to state the IF statement itself.</p>
  
  <p>I was thinking about doing something like:</p>
  
  <pre><code>if(BooleanParameterValue['BUILD_SNAPSHOT']){...
  </code></pre>
  
  <p>What is the correct way to write this statement please?</p>