All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.stapi.graphoperations.objectGraphMapper.model.GraphMappingResult Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ai.stapi.graphoperations.objectGraphMapper.model;

import ai.stapi.graph.graphElementForRemoval.GraphElementForRemoval;
import ai.stapi.graph.Graph;
import java.util.ArrayList;
import java.util.List;

public class GraphMappingResult {

  private final List elementForRemoval;
  private final Graph graph;

  public GraphMappingResult(
      Graph graph,
      List elementForRemoval
  ) {
    this.elementForRemoval = elementForRemoval;
    this.graph = graph;
  }

  public List getElementForRemoval() {
    return elementForRemoval;
  }

  public Graph getGraph() {
    return graph;
  }

  public GraphMappingResult merge(GraphMappingResult anotherMappingResult) {
    var mergedList = new ArrayList<>(this.elementForRemoval);
    mergedList.addAll(anotherMappingResult.elementForRemoval);
    return new GraphMappingResult(
        this.getGraph().merge(anotherMappingResult.graph),
        mergedList
    );
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy