/** * This template method calls the applyFilter() hook method (which * must be defined by a subclass) to filter the @a imageEntity * parameter and sets the filterName of the result to the name of * the filter. */ public Image filter(Image image) { // Call the applyFilter() hook method. Image filteredResult = applyFilter(image); filteredResult.setFilterName(this); return filteredResult; }