public static boolean isExtension(String filename, Collection extensions) {
    """
	Checks whether the extension of the filename is one of those specified.
	<p>
	This method obtains the extension as the textual part of the filename
	after the last dot. There must be no directory separator after the dot.
	The extension check is case-sensitive on all platforms.
	
	@param filename  the filename to query, null returns false
	@param extensions  the extensions to check for, null checks for no extension
	@return true if the filename is one of the extensions
    """
        if (filename == null) {
            return false;
        }
        if ((extensions == null) || extensions.isEmpty()) {
            return (indexOfExtension(filename) == -1);
        }
        String fileExt = getExtension(filename);
        for (Iterator it = extensions.iterator(); it.hasNext();) {
            if (fileExt.equals(it.next())) {
                return true;
            }
        }
        return false;
    }
public static boolean isExtension(String filename, Collection extensions) {
        if (filename == null) {
            return false;
        }
        if ((extensions == null) || extensions.isEmpty()) {
            return (indexOfExtension(filename) == -1);
        }
        String fileExt = getExtension(filename);
        for (Iterator it = extensions.iterator(); it.hasNext();) {
            if (fileExt.equals(it.next())) {
                return true;
            }
        }
        return false;
    }
public static boolean isExtension ( String filename , Collection extensions ) { if ( filename == null ) { return false ; } if ( ( extensions == null ) || extensions . isEmpty ( ) ) { return ( indexOfExtension ( filename ) == - 1 ) ; } String fileExt = getExtension ( filename ) ; for ( Iterator it = extensions . iterator ( ) ; it . hasNext ( ) ; ) { if ( fileExt . equals ( it . next ( ) ) ) { return true ; } } return false ; }
Checks whether the extension of the filename is one of those specified.
<p>
This method obtains the extension as the textual part of the filename
after the last dot. There must be no directory separator after the dot.
The extension check is case-sensitive on all platforms.

@param filename  the filename to query, null returns false
@param extensions  the extensions to check for, null checks for no extension
@return true if the filename is one of the extensions
Checks whether the extension of the filename is one of those specified . <p > This method obtains the extension as the textual part of the filename after the last dot . There must be no directory separator after the dot . The extension check is case - sensitive on all platforms .