question: private void buildCursorConditionally ( MatrixCursor cursor , CharacterRecord cr , String selection , String [ ] selectionArgs ) { if ( selectionArgs == null ) cursor . addRow ( new Object [ ] { cr . getId ( ) , cr . getName ( ) , cr . getRace ( ) } ) ; else for ( String item : selectionArgs ) if ( ( selection . equals ( CharacterContract . CharacterEntry . COLUMN_NAME ) && item . equals ( cr . getName ( ) ) ) || ( selection . equals ( CharacterContract . CharacterEntry . COLUMN_RACE ) && item . equals ( cr . getRace ( ) ) ) ) { cursor . addRow ( new Object [ ] { cr . getId ( ) , cr . getName ( ) , cr . getRace ( ) } ) ; } }
target:  Build a MatrixCursor that matches the parameters.  This plays the role of the "concrete hook method" in the Template Method pattern.