src/test/java/systemtests/MaintainSortedMechanismSystemTest.java
private boolean checkSorted(List listToCheck) {
        if (listToCheck.size() == 0 || listToCheck.size() == 1) {
            return true;
        } else {
            return compareParcels((Parcel) listToCheck.get(0), (Parcel) listToCheck.get(1))
                    && checkSorted(listToCheck.subList(1, listToCheck.size() - 1));
        }
    }
/**
     * Iterates recursively through the input list to check whether each element is in sorted order.
     */
Iterates recursively through the input list to check whether each element is in sorted order.
Iterates recursively through the input list to check whether each element is in sorted order .
private boolean checkSorted(List listToCheck) {
        if (listToCheck.size() == 0 || listToCheck.size() == 1) {
            return true;
        } else {
            return compareParcels((Parcel) listToCheck.get(0), (Parcel) listToCheck.get(1))
                    && checkSorted(listToCheck.subList(1, listToCheck.size() - 1));
        }
    }
private boolean checkSorted ( List listToCheck ) { if ( listToCheck . size ( ) == 0 || listToCheck . size ( ) == 1 ) { return true ; } else { return compareParcels ( ( Parcel ) listToCheck . get ( 0 ) , ( Parcel ) listToCheck . get ( 1 ) ) && checkSorted ( listToCheck . subList ( 1 , listToCheck . size ( ) - 1 ) ) ; } }
Iterates recursively through the input list to check whether each element is in sorted order.
Iterates recursively through the input list to check whether each element is in sorted order .