class UnifierConfiguration {
  /**
   * A Map for storing the equivalence types for features. Features are
   * specified as Strings, and map into types defined as maps from Strings to
   * Elements.
   */
  private final Map<EquivalenceTypeLocator, PatternToken> equivalenceTypes;

  /**
   * A Map that stores all possible equivalence types listed for features.
   */
  private final Map<String, List<String>> equivalenceFeatures;

  public UnifierConfiguration() {
    // workaround for issue #13
    equivalenceTypes = new ConcurrentHashMap<>();
    equivalenceFeatures = new ConcurrentHashMap<>();
  }

  /**
   * Prepares equivalence types for features to be tested. All equivalence
   * types are given as {@link PatternToken}s. They create an equivalence set (with
   * abstraction).
   *
   * @param feature Feature to be tested, like gender, grammatical case or number.
   * @param type Type of equivalence for the feature, for example plural, first person, genitive.
   * @param elem Element specifying the equivalence.
   */
  public final void setEquivalence(String feature, String type,
                                   PatternToken elem) {<FILL_FUNCTION_BODY>}

  public Map<EquivalenceTypeLocator, PatternToken> getEquivalenceTypes() {
    return Collections.unmodifiableMap(equivalenceTypes);
  }

  public Map<String, List<String>> getEquivalenceFeatures() {
    return Collections.unmodifiableMap(equivalenceFeatures);
  }

  public Unifier createUnifier() {
    return new Unifier(getEquivalenceTypes(), getEquivalenceFeatures());
  }
}


    EquivalenceTypeLocator typeKey = new EquivalenceTypeLocator(feature, type);
    if (equivalenceTypes.containsKey(typeKey)) {
      return;
    }
    equivalenceTypes.put(typeKey, elem);
    
    List<String> lTypes;
    if (equivalenceFeatures.containsKey(feature)) {
      lTypes = equivalenceFeatures.get(feature);
    } else {
      // workaround for issue #13
      lTypes = new CopyOnWriteArrayList<>();
      equivalenceFeatures.put(feature, lTypes);
    }
    lTypes.add(type);
  
<no_super_class>