src/main/java/ru/mail/dondokidon/extensions/MultiCompare.java
/**
     * Sort array
     *
     * @param mas Array to sort
     * @param Comparator {@link MultiComparator} which will compare objects in array
     * @param <SortingType> The type of objects that will be compared
     */
Sort array
@param mas Array to sort
@param Comparator  MultiComparator which will compare objects in array
@param  The type of objects that will be compared
Sort array @param mas Array to sort @param Comparator MultiComparator which will compare objects in array @param The type of objects that will be compared
public static <SortingType> void sort(
            @NotNull List<SortingType> mas, @NotNull MultiComparator<? super SortingType> Comparator){
        @SuppressWarnings("unchecked")
        SortingType[] HeapPollutionTemp = (SortingType[]) mas.toArray();
        rsort(HeapPollutionTemp, Comparator);
        ListIterator<SortingType> iter = mas.listIterator();
        for (SortingType item : HeapPollutionTemp) {
            iter.next();
            iter.set((SortingType)item);
        }
    }
public static < SortingType > void sort ( @ NotNull List < SortingType > mas , @ NotNull MultiComparator < ? super SortingType > Comparator ) { @ SuppressWarnings ( "unchecked" ) SortingType [ ] HeapPollutionTemp = ( SortingType [ ] ) mas . toArray ( ) ; rsort ( HeapPollutionTemp , Comparator ) ; ListIterator < SortingType > iter = mas . listIterator ( ) ; for ( SortingType item : HeapPollutionTemp ) { iter . next ( ) ; iter . set ( ( SortingType ) item ) ; } }
Sort array
 @param mas Array to sort
 @param Comparator {@link MultiComparator} which will compare objects in array
 @param <SortingType> The type of objects that will be compared
Sort array @param mas Array to sort @param Comparator { @link MultiComparator } which will compare objects in array @param <SortingType > The type of objects that will be compared
//All items in Temp are SortingType class.