src/main/java/seedu/address/model/job/Salary.java
public static boolean isValidSalary(String salary) {
        requireNonNull(salary);
        if (!salary.matches(VALIDATION_REGEX)) {
            return false;
        }
        String trimmedSalary = salary.trim();
        int index = trimmedSalary.indexOf("-");
        String startingSalary = trimmedSalary.substring(0, index).trim();
        String endSalary = trimmedSalary.substring(index + 1).trim();
        String salaryRange = startingSalary + "-" + endSalary;
        return salaryRange.matches(VALIDATION_REGEX)
                && Integer.parseInt(startingSalary) <= Integer.parseInt(endSalary);
    }
/**
     * checks for valid salary range
     * @param salary salary range
     * @return True if salary range is valid, false otherwise
     */
checks for valid salary range
@param salary salary range
@return True if salary range is valid, false otherwise
checks for valid salary range @param salary salary range @return True if salary range is valid false otherwise
public static boolean isValidSalary(String salary) {
        requireNonNull(salary);
        if (!salary.matches(VALIDATION_REGEX)) {
            return false;
        }
        String trimmedSalary = salary.trim();
        int index = trimmedSalary.indexOf("-");
        String startingSalary = trimmedSalary.substring(0, index).trim();
        String endSalary = trimmedSalary.substring(index + 1).trim();
        String salaryRange = startingSalary + "-" + endSalary;
        return salaryRange.matches(VALIDATION_REGEX)
                && Integer.parseInt(startingSalary) <= Integer.parseInt(endSalary);
    }
public static boolean isValidSalary ( String salary ) { requireNonNull ( salary ) ; if ( ! salary . matches ( VALIDATION_REGEX ) ) { return false ; } String trimmedSalary = salary . trim ( ) ; int index = trimmedSalary . indexOf ( "-" ) ; String startingSalary = trimmedSalary . substring ( 0 , index ) . trim ( ) ; String endSalary = trimmedSalary . substring ( index + 1 ) . trim ( ) ; String salaryRange = startingSalary + "-" + endSalary ; return salaryRange . matches ( VALIDATION_REGEX ) && Integer . parseInt ( startingSalary ) <= Integer . parseInt ( endSalary ) ; }
checks for valid salary range
 @param salary salary range
 @return True if salary range is valid, false otherwise
checks for valid salary range @param salary salary range @return True if salary range is valid false otherwise