Package java.util

Examples of java.util.Set.retainAll()


      {
         lock.readLock().lock();
         try
         {
            Set state = getCurrentState(true);
            return state.retainAll(c);
         }
         finally
         {
            lock.readLock().unlock();
         }
View Full Code Here


     */
    private Set determineCommonDeclarations()
    {
        Set commonDeclarations = new HashSet( this.leftInput.getTupleDeclarations( ) );

        commonDeclarations.retainAll( this.rightInput.getTupleDeclarations( ) );

        return commonDeclarations.isEmpty( ) ? Collections.EMPTY_SET : Collections.unmodifiableSet( commonDeclarations );
    }

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
View Full Code Here

            for (int j = 0; j < intersected.length; j++) {
                Collection arts = getArtifactsIncludingExtending(intersected[j]);
                if (intersectedArtifacts.isEmpty()) {
                    intersectedArtifacts.addAll(arts);
                } else {
                    intersectedArtifacts.retainAll(arts);
                }
            }
            if (artifacts != null) {
                intersectedArtifacts.addAll(artifacts);
            }
View Full Code Here

        return result;
    }
   
    protected void runTest() throws Throwable {
        Set signatures = getMethodSignatures(omInterface);
        signatures.retainAll(getMethodSignatures(domInterface));
        if (exceptions != null) {
            signatures.removeAll(Arrays.asList(exceptions));
        }
        if (!signatures.isEmpty()) {
            fail("Method collision detected for the following methods: " + signatures);
View Full Code Here

        for (int i = 0; i < actions.size(); i++) {
            MultiIndex.Action a = (MultiIndex.Action) actions.get(i);
            if (a.getType() == MultiIndex.Action.TYPE_COMMIT) {
                transactionIds.clear();
            } else if (a.getType() == MultiIndex.Action.TYPE_VOLATILE_COMMIT) {
                transactionIds.retainAll(losers);
                // check if transactionIds contains losers
                if (transactionIds.size() > 0) {
                    // found dirty volatile commit
                    break;
                } else {
View Full Code Here

    private static Method getCallbackMethod(Class cls) {
        // Look at only public methods defined by the Callback class
        Method[] pubMethods = cls.getDeclaredMethods();
        Method[] classMethods = cls.getMethods();
        Set pmethods = new HashSet(Arrays.asList(pubMethods));
        pmethods.retainAll(Arrays.asList(classMethods));

        // Remove Object methods disallowed as callback method names
        for (Iterator i=pmethods.iterator();i.hasNext();) {
            Method m = (Method)i.next();
            if (Callback.FORBIDDEN_NAMES.contains(m.getName())) {
View Full Code Here

    private static Method getCallbackMethod(Class cls) {
        // Look at only public methods defined by the Callback class
        Method[] pubMethods = cls.getDeclaredMethods();
        Method[] classMethods = cls.getMethods();
        Set pmethods = new HashSet(Arrays.asList(pubMethods));
        pmethods.retainAll(Arrays.asList(classMethods));

        // Remove Object methods disallowed as callback method names
        for (Iterator i=pmethods.iterator();i.hasNext();) {
            Method m = (Method)i.next();
            if (Callback.FORBIDDEN_NAMES.contains(m.getName())) {
View Full Code Here

     * @see org.apache.slide.webdav.util.DaslConstants
     */
    public Set getSupportedLiveProperties( String filter ) {
        Set s = getSupportedLiveProperties( new String[0] );
        if( Q_COMPUTED_ONLY.equals(filter) ) {
            s.retainAll( computedProperties );
        }
        if( Q_PROTECTED_ONLY.equals(filter) ) {
            s.retainAll( protectedProperties );
        }
        return s;
View Full Code Here

        Set s = getSupportedLiveProperties( new String[0] );
        if( Q_COMPUTED_ONLY.equals(filter) ) {
            s.retainAll( computedProperties );
        }
        if( Q_PROTECTED_ONLY.equals(filter) ) {
            s.retainAll( protectedProperties );
        }
        return s;
    }
   
    /**
 
View Full Code Here

     * @see org.apache.slide.webdav.util.DaslConstants
     */
    public Set getSupportedLiveProperties( String filter, String[] excludedFeatures ) {
        Set s = getSupportedLiveProperties( excludedFeatures );
        if( Q_COMPUTED_ONLY.equals(filter) ) {
            s.retainAll( computedProperties );
        }
        if( Q_PROTECTED_ONLY.equals(filter) ) {
            s.retainAll( protectedProperties );
        }
        return s;
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.