@ SuppressWarnings ( "unchecked" ) public < T extends Filter > T getFirstFilterForField ( String field ) { for ( Filter filter : this . filters ) { if ( filter . getField ( ) . equals ( field ) ) { return ( T ) filter ; } } return null ; }
Returns the first filter for the field .