class OrderingHelper {

    public static void sort( final List<BaseDimensionalItemObject> dimensionalItems, final OrderParams sortingParams )
    {
        if ( sortingParams != null && isNotEmpty( dimensionalItems ) )
        {
            final ComparatorChain<BaseDimensionalItemObject> chainOfComparators = new ComparatorChain<>();
            final Set<String> orderingPairs = sortingParams.getOrders();

            if ( sortingParams != null && isNotEmpty( orderingPairs ) )
            {
                for ( final String orderingPair : orderingPairs )
                {
                    chainOfComparators.addComparator( getComparator( orderingPair ) );
                }

                dimensionalItems.sort( chainOfComparators );
            }
        }
    }

}