Checks whether the method is of the modifier determined by this instance.
this
true if the method is declared with the expected modifier, false otherwise.
true
false
the method to check