public boolean accepts ( String type ) { if ( m_acceptsAll ) { return true ; } String [ ] parts = type . split ( "/" ) ; if ( parts . length != 2 ) { return false ; } for ( String element : m_types ) { if ( element . equals ( parts [ 0 ] + "/*" ) || element . equals ( type ) ) { return true ; } } return false ; }
Does this rule allow the given type?