Details
-
Task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
The QueryProperties class contains many boolean attributes to indicate if a query has a certain feature or not. This implementation is wasteful in terms of memory since queries usually have only a few of these features and the majority will remain at their default values. Moreover, the class is unnecessarily verbose since each feature requires a dedicated getter/setter.
The readability and efficiency of the class and its callers can be improved by using an enumeration to hold each available query feature and a Set (EnumSet?) inside QueryProperties to hold all the features that appear in the query.