It would be one line if not for the dot requirement. <code>FileNameExtensionFilter</code> requires that the extensions have no dots. It also requires that the extensions contain characters (i.e. not the empty string) so that test would need to be removed.
===Using Lambda Expressions===
{{works with|Java|Current+}}
This version is the same as the main version only replace the definition for <code>extIsIn</code> with: