Code example for HashSet

Methods: isEmptyretainAll

0
    protected Boolean findShortcut() {
        if (required.isEmpty() && excluded.isEmpty()) {
            // no condition, always matches 
            return Boolean.TRUE;
        } 
        Collection<String> intersection = new HashSet<String>(required);
        intersection.retainAll(excluded);
        if (!intersection.isEmpty()) {
            // non-empty intersection, filter can never match 
            return Boolean.FALSE;
        } 
        return null; 
    } 
 
    @Override 
    public boolean accept(DocumentModel docModel) {
        if (shortcut != null) {
            return shortcut;
        } 
        for (String exc : excluded) {
Connect your IDE to all the code out there  Get Codota for Java