code: public void add(Boolean bool) {
      elements.add(bool == null ? JsonNull.INSTANCE : new JsonPrimitive(bool));
    }
docs: Adds the specified boolean to self.
  
  @param bool the boolean that needs to be added to the array.