I don't know if it is for testing purposes but you shouldn't write ouput tot the console in the method itself.
if (equalOk == true) The comparison is redundant as equalOk is a bool which can only be true or false. Thus, this can be rewritten as:
if (equalOk) In following code, the else statement is also redundant. If the previous check succeeds, the return will be called and the else will never execute. If it fails, the second return will be called, no need for an else statement.
if (equalOk == true) { return true; } else return false; becomes:
if (equalOk == true) { return true; } else return false; and can even be shortened to simply this, because you're simply returning a boolean corresponding to the equalOk value:
return equalOk; Edit:
If I understand your logic, it can be shortened to:
if (c > a && b - a == c - b) { return true; } if (allowEqual) { return (a == b && b <= c) || (a <= b && b == c); } return false;