@ Override public boolean accept ( final File f ) { if ( f . isDirectory ( ) ) return true ; int len = extensions . size ( ) ; if ( len == 0 ) return true ; for ( int i = 0 ; i < len ; i ++ ) { String suffix = extensions . get ( i ) ; if ( suffix . equals ( "*" ) ) return true ; if ( f . getName ( ) . toLowerCase ( ) . endsWith ( ' ' + suffix ) ) return true ; if ( f . getName ( ) . toLowerCase ( ) . startsWith ( suffix + ' ' ) ) return true ; // Amiga Mods *start* with suffix, e.g. "mod.songname" } return false ; }
Whether the given file is accepted by this filter .