Package java.util

Examples of java.util.HashSet.removeAll()


        Set found = new HashSet();
        findFiles(rootDir, found);

        Set extraFiles = new HashSet(found);
        extraFiles.removeAll(filesState);
        if (!extraFiles.isEmpty()) {
            System.out.println("The following extra files were found");
            for (Iterator i = extraFiles.iterator(); i.hasNext();) {
                File file = (File) i.next();
                System.out.println("  " + file);
View Full Code Here


                System.out.println("  " + file);
            }
        }

        Set missingFiles = new HashSet(filesState);
        missingFiles.removeAll(found);
        if (!missingFiles.isEmpty()) {
            System.out.println("The following files were missing");
            for (Iterator i = missingFiles.iterator(); i.hasNext();) {
                File file = (File) i.next();
                System.out.println("  " + file);
View Full Code Here

        this.supportedContextKeys = new HashSet(Arrays.asList(supportedContextKeys));
    }

    protected void validateContextKeys(Map context) {
        Set unkownKeys = new HashSet(context.keySet());
        unkownKeys.removeAll(supportedContextKeys);
        for (Iterator i = unkownKeys.iterator(); i.hasNext();) {
            final Object key = i.next();
            context.remove(key);
            if (log.isWarnEnabled()) {
                log.warn("Context key '" + key + "' not supported.");
View Full Code Here

            return propertyNames;
        }

        NodeState other = (NodeState) getOverlayedState();
        HashSet set = new HashSet(propertyNames);
        set.removeAll(other.propertyNames);
        return set;
    }

    /**
     * Returns a list of child node entries that do not exist in the overlayed
View Full Code Here

            return Collections.EMPTY_SET;
        }

        NodeState other = (NodeState) getOverlayedState();
        HashSet set = new HashSet(other.propertyNames);
        set.removeAll(propertyNames);
        return set;
    }

    /**
     * Returns a list of child node entries, that exist in the overlayed node state
View Full Code Here

        if (!hasOverlayedState() || !isShareable()) {
            return Collections.EMPTY_SET;
        }
        NodeState other = (NodeState) getOverlayedState();
        HashSet set = new HashSet(sharedSet);
        set.removeAll(other.sharedSet);
        return set;
    }

    /**
     * Returns a set of shares that were removed.
View Full Code Here

        if (!hasOverlayedState() || !isShareable()) {
            return Collections.EMPTY_SET;
        }
        NodeState other = (NodeState) getOverlayedState();
        HashSet set = new HashSet(other.sharedSet);
        set.removeAll(sharedSet);
        return set;
    }

    //--------------------------------------------------< ItemState overrides >
View Full Code Here

        Set newDefs = new HashSet(Arrays.asList(entNew.getAllItemDefs()));
        Set allDefs = new HashSet(Arrays.asList(entAll.getAllItemDefs()));

        // added child item definitions
        Set addedDefs = new HashSet(newDefs);
        addedDefs.removeAll(oldDefs);

        // referential integrity check
        boolean referenceableOld = entOld.includesNodeType(NameConstants.MIX_REFERENCEABLE);
        boolean referenceableNew = entNew.includesNodeType(NameConstants.MIX_REFERENCEABLE);
        if (referenceableOld && !referenceableNew) {
View Full Code Here

        if (this.getSupportedAttributes().containsAll(specifiedAttributeNames)) {
            return;
        }

        Set unknownAttributes = new HashSet(specifiedAttributeNames);
        unknownAttributes.removeAll(this.getSupportedAttributes());

        StringBuffer errorMessage = new StringBuffer();
        errorMessage.append("Found one or more unknown attributes for builder node '");
        errorMessage.append(this.getNodeName());
        errorMessage.append("': ");
View Full Code Here

    }

    private String[] makeTypeIds( NodeImpl root, Graph gr, Set rootSet )
    {
        Set nonRootSet = new HashSet( gr ) ;
        nonRootSet.removeAll( rootSet ) ;

        // List<String> for the typeids
        List result = new ArrayList() ;

        if (rootSet.size() > 1) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.