code: public Defuzzifier constrDefuzzifier(String key, WeightedDefuzzifier.Type type) {
          Defuzzifier result = constructObject(key);
          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 type is the type of a WeightedDefuzzifier
  @return a Defuzzifier by executing the registered constructor and setting
  its type