Filter pattern or Criteria pattern is a propose pattern that enables developers to filter a set of objects using different criteria and chain them in a decoupled way through logical operation. This type of design pattern comes under structural pattern as this pattern combines many criteria to find single criteria.
We're going to make a Person object, Criteria interface and concrete lessons implementing this interface to filter directory of Person objects.
CriteriaPatternDemo, our demo class uses Criteria substance to filter List of Person substance based on different criteria and their combination.
Create a class on which criteria is to be practical.
Generate an interface for Criteria.
Construct concrete classes implementing the Criteria interface.
Apply changed Criteria and their arrangement to filter out persons.
Verify the output.
Design Patterns Related Interview Questions
|Java Script Interview Questions||AJAX Interview Questions|
|Graphic Design Interview Questions||Adobe Indesign Interview Questions|
|Java-Multithreading Interview Questions||Database Design Interview Questions|
|Compiler Design Interview Questions||CSS Advanced Interview Questions|
|Java Design Patterns Interview Questions||Hardware design Interview Questions|
|Material Design Lite Interview Questions||Object Oriented Analysis and Design Interview Questions|
|Standard Template Library (STL) Interview Questions|
Design Patterns Tutorial
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.