title: Add null-like value to String in Java
body: <p>I am writing test method like <code>setTask(Task task)</code>. And <code>Task</code> object has several fields, e.g.</p>
  
  <pre><code>public String vehicle;
  </code></pre>
  
  <p>Method <code>setTask</code> should be used in different test-cases, so I'd like to have an options for this field to accept values:</p>
  
  <ul>
  <li><code>null</code> - the method should not do anything in this particulare case;</li>
  <li><code>some string value</code> - e.g. <code>"", "Hello, World!", "Iso Isetta", ...</code></li>
  <li><code>random</code> - a value that indicates (as well as null indicates "no changes") that a random value should be selected for a drop-down list corresponding to this field.</li>
  </ul>
  
  <p>So what can I do to make <code>String</code> to be <code>SpecialString</code> which could accept values <code>null</code>, <code>random</code> &amp; <code>some string value</code>? (BTW: I don't want to set it to string value "RANDOM", and chech whether the value is equal to "RANDOM"-string)</p>
  
  <p><strong>UPDATE:</strong> I don't mean <code>random</code> like <code>random value from a set of values</code>, I mean <code>random</code> as well as <code>null</code> and this is for <code>setTask()</code> to handle <code>random</code> (select random from drop-down), and not to pass a random string from a set of values.</p>
  
  <p>Pseudocode:</p>
  
  <pre><code>Task task = new Task();
  task.vehicle = random;   // as well as null
  
  setTask(task)
  </code></pre>
  
  <p>in setTask(Task task):</p>
  
  <pre><code>if (task.vehicle == null) {
      //skip
  } else if (task.vehicle == random) {
      // get possible values from drop-down list
      // select one of them
  } else {
      // select value from drop-down list which is equal to task.vehicle
  }
  </code></pre>