question: protected Object visit ( BinaryLogicOperator filter , Object extraData ) { LOGGER . finer ( "exporting LogicFilter" ) ; final List < FilterBuilder > filterList = new ArrayList < > ( ) ; for ( final Filter child : filter . getChildren ( ) ) { child . accept ( this , extraData ) ; filterList . add ( filterBuilder ) ; } final FilterBuilder [ ] filters ; filters = filterList . toArray ( new FilterBuilder [ filterList . size ( ) ] ) ; if ( extraData . equals ( "AND" ) ) { filterBuilder = FilterBuilders . andFilter ( filters ) ; } else { filterBuilder = FilterBuilders . orFilter ( filters ) ; } return extraData ; }
target:  Common implementation for BinaryLogicOperator filters.  This way they're all handled centrally.