I have a List of interface type Criteria within my class Query.
List
Criteria
Query
List criteria = new ArrayList
There is nothing wrong with it.
People who never used instanceof only wrote toy applications.
instanceof