private void addEdgeDirectInternal(EdgeDirection direction, StatEdge edge, EdgeType edgetype) {
    Map<EdgeType, List<StatEdge>> mapEdges = direction == EdgeDirection.BACKWARD ? mapPredEdges : mapSuccEdges;
    Map<EdgeType, List<Statement>> mapStates = direction == EdgeDirection.BACKWARD ? mapPredStates : mapSuccStates;

    mapEdges.computeIfAbsent(edgetype, k -> new ArrayList<>()).add(edge);

    mapStates.computeIfAbsent(edgetype, k -> new ArrayList<>()).add(direction == EdgeDirection.BACKWARD ? edge.getSource() : edge.getDestination());
  }
private void addEdgeDirectInternal(EdgeDirection direction, StatEdge edge, EdgeType edgetype)