@Override
    public <S, T> void addRelation(QualifiedValue<S> source, QualifiedValue<T> target,
            Enum<?>... qualifiers) {
        Set<Enum<?>> qualifierSet = new LinkedHashSet<>();
        qualifierSet.addAll(Arrays.asList(qualifiers));

        Map<QualifiedValue<?>, Set<Enum<?>>> targetsMap = sourcesLookup.get(source);
        if (targetsMap == null) {
            targetsMap = new LinkedHashMap<>();
            sourcesLookup.put(source, targetsMap);
        }
        targetsMap.put(target, qualifierSet);

        Map<QualifiedValue<?>, Set<Enum<?>>> sourcesMap = targetsLookup.get(source);
        if (sourcesMap == null) {
            sourcesMap = new LinkedHashMap<>();
            targetsLookup.put(target, sourcesMap);
        }
        sourcesMap.put(source, qualifierSet);
    }