question: public static boolean checkVirtualPoolProtocols ( VirtualPool cos , HashSet < String > protocols , boolean matchAll ) { if ( ( protocols != null ) && ! protocols . isEmpty ( ) ) { StringSet cosProtocols = cos . getProtocols ( ) ; if ( ( matchAll ) && ( ! cosProtocols . containsAll ( protocols ) ) ) { _log . info ( "vpool does not support all requested protocol(s): {}" , protocols ) ; return false ; } else if ( ! matchAll ) { boolean hasMatch = false ; Iterator < String > protocolIter = protocols . iterator ( ) ; while ( protocolIter . hasNext ( ) ) { String protocol = protocolIter . next ( ) ; if ( cosProtocols . contains ( protocol ) ) { _log . debug ( "vpool supports protocol {}" , protocol ) ; hasMatch = true ; break ; } } return hasMatch ; } } return true ; }
target:  Check if the VirtualPool contains the passed protocols. If the matchAll parameter is true, the call returns true only if the VirtualPool contains all the passed protocols. Otherwise, the call returns true if the VirtualPool contains at least one of the passed protocols.