code: private void setBooleanParameter(String key, Boolean value){
          if (value == null){
              parameters.remove(key);
          }
          else if (value){
              parameters.put(key, 1);
          }
          else{
              parameters.put(key, 0);            
          }
      }
docs: Set a stored parameter that is a boolean.  This value will be stored as "1"
  for true and "0" for false.
  @param key the parameter's key
  @param value the parameter's value.  Removes the parameter if null