code: @SuppressWarnings("unchecked")
      public static <T extends Comparable<T>> AbstractEdge<?> createEdge(List<? extends Interval> intervals, Class<?> clsDataType) throws MIDDException {
          Class<AbstractEdge<T>> clsEdgeType = (Class<AbstractEdge<T>>) getEdgeClassType(clsDataType);
          List<Interval<T>> lst = new ArrayList<>();
          for(Interval i : intervals) {
              lst.add(new Interval<T>(i));
          }
          try {
              Constructor<AbstractEdge<T>> constructor = clsEdgeType.getConstructor(List.class);
              return constructor.newInstance(lst);
          } catch (NoSuchMethodException e) {
              log.error("Cannot find the constructor for the class {}", clsDataType.getName(), e);
          } catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
              log.error("Failed to construct object of type '{}'", clsDataType.getName(), e);
          }
  
          throw new MIDDException("Unsupported data type to create edge of type " + clsDataType.getName());
      }
docs: Create an out-going edge for the variable data type <code>clsDataType</code> and
  with the predicate be the list of intervals.
  
  @param intervals list of intervals using as the edge's predicate
  @param clsDataType
  @param <T>
  @return
  @throws nl.uva.sne.midd.MIDDException