Convenience Methods

Convenience methods, also known as "helper methods", are methods which provide commonly used functionality. They generally have no state or minimal state, where all or nearly all of the objects to be used are passed in. Methods can also be called convenience methods when they reduce clutter in the calling methods (to ensure all method lengths are small).


convenience: 2 a: something (as an appliance, device, or service) conducive to comfort or ease (Merriam-Webster Online, http://www.m-w.com/cgi-bin/dictionary?sourceid=Mozilla-search&va=Convenience)


The implication of a "convenience method", then, is that the caller does not have to perform the necessary task "themselves". The implementation is already provided. Most often convenience methods providing similar tasks are grouped together in a utility class (see UtilityPattern).


EditText of this page (last edited May 13, 2007) or FindPage with title or text search