code: private Delta<E> toDelta(difflib.Delta<E> delta) throws DiffException
      {
          Delta<E> newDelta;
  
          switch (delta.getType()) {
              case CHANGE:
                  newDelta = new ChangeDelta<E>(delta.getOriginal(), delta.getRevised());
                  break;
              case DELETE:
                  newDelta = new DeleteDelta<E>(delta.getOriginal(), delta.getRevised());
                  break;
              case INSERT:
                  newDelta = new InsertDelta<E>(delta.getOriginal(), delta.getRevised());
                  break;
              default:
                  throw new DiffException(String.format("Failed to convert [%s] info [%s]. Unknown type [%s]", delta
                      .getClass().getName(), Delta.class.getName(), delta.getType().toString()));
          }
  
          return newDelta;
      }
docs: Convert {@link difflib.Delta} into {@link Delta}.
  
  @param delta the {@link difflib.Delta} to convert
  @return the {@link Delta}
  @throws DiffException error when converting the delta