I know the term "pure function", which describes a function whose output depends only on input.
Is there a similar name for a method (function of an object) whose output depends only on the input and state of the object?
Bertrand Meyer , inventor of the Eiffel programming language and author of Object-Oriented Software Engineering , calls them "query methods."
I would call it the state method
State (design-pattern), ( )
State