this is related to API design, on Android:

I want to have good coding style, and yes, i realize this is very minor, but let's say i have something like:

```
public boolean validateSomeInputAndDoLogicIfNot(Context context, MyObject myObject) {
    if (someObject.isCaseOne()) {
        Toast.makeToast...
        return true;
    } else if (someObject.isCaseTwo()) {
        doSomethingCrazyHere();
        return true;
    }
    doSomethingMinorHere();
    return false;
}

```

Firstly, I have seen a lot of code that names their functions like `isValid(input)`. but let's say if it's not valid, i want the function to do different things. now, the other thing is that: i will be using this function multiple times.

So, in my mind, naming something like `isValid()` means that it doesn't do any logic, it just simply does some checks, and doesn't do anything fancy.

but naming something like `validateObject()` makes me think that it should be a void function that can do different things, but of course, not return a boolean.

so my question is: what is a proper name for this particular type of function?

\*\*UPDATE:

Firstly, thanks for the suggestions on breaking it into two functions. the only reason i don't prefer it is that `someObject` can have multiple states that cause it to be valid or invalid or whatever. hence, `someObject.isCaseOne()` and `someObject.isCaseTwo()`. so if i were to check each state, i'd prolly have to make an enum for multiple states of an object? which i feel like is introducing unnecessary code :(