title: Setting random values to unassigned/optional parameters
body: <p>I am building a tiled map generator application and I want users to be able to set subareas of a map to be a specific type of tile when building it.
  This is currently implemented like this:</p>
  
  <pre><code>public boolean setArea(int bottomLeftX, int bottomLeftY, int subWidth, int subHeight, TerrainType aAreaType){
      boolean areaOverflow = false;
          System.out.println("Subarea coords...     x,y:"+bottomLeftX+","+bottomLeftY+" width/height:"+subWidth+"/"+subHeight);
          for(int x=bottomLeftX;x&lt;=bottomLeftX+subWidth-1;x++){
              for(int y=bottomLeftY;y&lt;=bottomLeftY+subHeight-1;y++){
                  if(x&gt;=0 &amp;&amp; y&gt;=0 &amp;&amp;
                     x&lt;this.getWidth() &amp;&amp; y&lt;this.getHeight()){
                      this.setTile(x, y, aAreaType);
                  }
                  else{
                      areaOverflow = true;
                  }
              }
          }
          return areaOverflow;
      }
  }
  </code></pre>
  
  <p>(TerrainType is an enum with information on the terrain type and the setTile method sets a value in the map array to be a certain terrain type. this.getWidth/Height() returns the size of the array for the map)</p>
  
  <p>But I want the user to not have to decide on every value and allow some to be chosen randomly. The idea I had initially was to allow the user to set some values as null and if a value gets passed in as null, have the Java random function decide on an arbitrary value for that parameter (within the size of the map), however you can't set ints to null. I was wondering what an alternative option would involve?</p>