code: private <O> O getValue(Map<String, O> nameValueMap, String attributeName, O defaultValue) {
          if(attributeName == null) {
              throw new NullPointerException("name must not be null");
          }
          if(nameValueMap == null) {
              return defaultValue;
          }
          O value = nameValueMap.get(attributeName);
          if(value == null) {
              return defaultValue;
          }
          return value;
      }
docs: Gets the value, or default value, of an attribute.
  @param nameValueMap The name attribute value map which maps attribute names to attribute values.
  @param attributeName The name of the attribute to retrieve.
  @param defaultValue A default value, which will be returned if there is no set value for the specified attribute
  name in the specified attribute name value map.
  @param <O> The type of attribute value
  @return The attribute value that is set for the specified name in the specified map, or the value specified by
  the defaultValue parameter if no attribute with the specified name is set in the specified map.