Interface MergeFunction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MergeFunction
Describes how to create the merged element for one ElementGroup.

Contract:

  • MUST call aliases.register(newId, oldIds) with the chosen new element id and the ids of all group members.
  • MUST NOT emit AddSupport commands — support edge reconstruction is handled automatically by CompositionOperator in Phase 2 using the completed AliasRegistry.
  • Method Summary

    Modifier and Type
    Method
    Description
    merge(String resultModelName, ElementGroup group, AliasRegistry aliases)
    Creates the merged element for group inside resultModelName and registers the mapping in aliases.
  • Method Details

    • merge

      List<Command> merge(String resultModelName, ElementGroup group, AliasRegistry aliases)
      Creates the merged element for group inside resultModelName and registers the mapping in aliases.
      Parameters:
      resultModelName - name of the result model being built
      group - the equivalence class to merge
      aliases - registry to record old-id → new-id mappings
      Returns:
      commands that create the merged element (no AddSupport)