src/main/java/ru/mail/dondokidon/extensions/MultiCompare.java
/**
     * Sort array and name each subgroup of sorted data
     *
     * @param mas Array to sort (will be sorted in result as well)
     * @param Comparator {@link MultiComparator} which will compare objects in array
     * @param <SortingType> The type of objects that will be compared
     * @return Sorted array with named subgroups
     */
Sort array and name each subgroup of sorted data
@param mas Array to sort (will be sorted in result as well)
@param Comparator  MultiComparator which will compare objects in array
@param  The type of objects that will be compared
@return Sorted array with named subgroups
Sort array and name each subgroup of sorted data @param mas Array to sort ( will be sorted in result as well ) @param Comparator MultiComparator which will compare objects in array @param The type of objects that will be compared @return Sorted array with named subgroups
public static <SortingType> ArrayList<Object> sortNamed(
            @NotNull List<SortingType> mas, @NotNull MultiComparator<? super SortingType> Comparator){
        @SuppressWarnings("unchecked")
        SortingType[] HeapPollutionTemp = (SortingType[]) mas.toArray();
        ArrayList<Object> Return = rsortAndReturnArrayWithNamedBlocks(HeapPollutionTemp, Comparator);
        ListIterator<SortingType> iter = mas.listIterator();
        for (SortingType item : HeapPollutionTemp) {
            iter.next();
            iter.set(item);
        }
        return Return;
    }
public static < SortingType > ArrayList < Object > sortNamed ( @ NotNull List < SortingType > mas , @ NotNull MultiComparator < ? super SortingType > Comparator ) { @ SuppressWarnings ( "unchecked" ) SortingType [ ] HeapPollutionTemp = ( SortingType [ ] ) mas . toArray ( ) ; ArrayList < Object > Return = rsortAndReturnArrayWithNamedBlocks ( HeapPollutionTemp , Comparator ) ; ListIterator < SortingType > iter = mas . listIterator ( ) ; for ( SortingType item : HeapPollutionTemp ) { iter . next ( ) ; iter . set ( item ) ; } return Return ; }
Sort array and name each subgroup of sorted data
 @param mas Array to sort (will be sorted in result as well)
 @param Comparator {@link MultiComparator} which will compare objects in array
 @param <SortingType> The type of objects that will be compared
 @return Sorted array with named subgroups
Sort array and name each subgroup of sorted data @param mas Array to sort ( will be sorted in result as well ) @param Comparator { @link MultiComparator } which will compare objects in array @param <SortingType > The type of objects that will be compared @return Sorted array with named subgroups
//All items in Temp are SortingType class.