Friday, December 14, 2018

single word requests - What do you call something that gathers a particular property given an object?




I'm working on a program that will have a list of functions each of which, given an object, will return a particular property of the object. For instance, one of these will return the height of the object, another will return the width, another the color, and so on. These properties will then be used to filter these objects given a list of property names and values.



Since the user will be able to create functions like these, and they'll be on a list, I need to give a name to the list. One option I though of was "gatherers", since they gather properties given object, but this doesn't capture the fact that each of them gathers specific properties, or that they are meant to filter stuff.



Another option would be "filters" but these are not exactly filters, since a filter has a both property and a value (like WHERE TEXT = 'hello' in a SQL query), while these represent the property without a value, or more precisely, the ability to recognize the value of a particular property given an object.



Is there any single word, or at least couple of words, that capture this idea?


Answer



You may use the noun collectors; and each "collector" picks up different "property".




Also, in object-oriented programming, the term setters and getters is used within a Mutator method. Please Check here if setters and getters is something suitable for naming your functions.


No comments:

Post a Comment