code: public Defuzzifier constructDefuzzifier(String key, int resolution,
              WeightedDefuzzifier.Type type) {
          Defuzzifier result = constructObject(key);
          if (result instanceof IntegralDefuzzifier) {
              ((IntegralDefuzzifier) result).setResolution(resolution);
          } else if (result instanceof WeightedDefuzzifier) {
              ((WeightedDefuzzifier) result).setType(type);
          }
          return result;
      }
docs: Creates a Defuzzifier by executing the registered constructor
  
  @param key is the unique name by which constructors are registered
  @param resolution is the resolution of an IntegralDefuzzifier
  @param type is the type of a WeightedDefuzzifier
  @return a Defuzzifier by executing the registered constructor and setting
  its resolution or type accordingly