code: @SuppressWarnings("unchecked")
    public static <T extends Sorter> T createSorter(final SortType type) {
      switch (ObjectUtils.defaultIfNull(type, SortType.UNKONWN)) {
        case BUBBLE_SORT:
          return (T) new BubbleSort();
        case COMB_SORT:
          return (T) new CombSort();
        case HEAP_SORT:
          return (T) new HeapSort();
        case INSERTION_SORT:
          return (T) new InsertionSort();
        case MERGE_SORT:
          return (T) new MergeSort();
        case QUICK_SORT:
          return (T) new QuickSort();
        case SELECTION_SORT:
          return (T) new SelectionSort();
        case SHELL_SORT:
          return (T) new ShellSort();
        default:
          throw new IllegalArgumentException(String.format("The SortType (%1$s) is not supported by the %2$s!", type,
            SorterFactory.class.getSimpleName()));
      }
    }
docs: Creates an instance of the Sorter interface implementing the sorting algorithm based on the SortType.
  
  @param <T> the Class type of the actual Sorter implementation based on the SortType.
  @param type the type of sorting algorithm Sorter implementation to create.
  @return a Sorter implementation subclass that implements the sorting algorithm based on the SortType.
  @see org.cp.elements.util.sort.Sorter
  @see org.cp.elements.util.sort.SortType