An interviewer used this term with me six months ago and I really didn’t know what he meant. I asked him to clarify and… he didn’t. I’ve searched the web off and on for a definition, and while I’ve seen it used in other questions or topics, I’ve never been able to find a clear, concise definition and example. So, can someone please help me and shed some light on what “consumable” means? Especially when used as in “One object is (or is not) consumable by another object.” I’ve made some inferences from context, but I don’t really know how correct I am.
Share
Some additional context would be useful, but I suspect the relevant definition is something like accepts as a parameter.
In particular, when one speaks of a particular data format one can say that some program produces or consumes that format; this is just the generalization of that to object interfaces. Object (class) A is consumable by object B iff an A can be given a B and use it directly (as opposed to needing some kind of adapter).