Package java.util

Examples of java.util.Set.retainAll()


        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


    this.rhs = rhs;
  }

  public Set matchingElements() {
    Set intersection = ProfileElement.profiles(lhs.matchingElements());
    intersection.retainAll(ProfileElement.profiles(rhs.matchingElements()));
    Set rc = ProfileElement.elements(intersection, lhs.matchingElements());
    rc.addAll(ProfileElement.elements(intersection, rhs.matchingElements()));
    return rc;
  }
View Full Code Here

  public static String[] getDifference(String oldValue, String newValue) {
    Set oldSet= deserialize(oldValue);
    Set newSet= deserialize(newValue);
    Set intersection= new HashSet(oldSet);
    intersection.retainAll(newSet);
    oldSet.removeAll(intersection);
    newSet.removeAll(intersection);
    oldSet.addAll(newSet);
    return (String[]) oldSet.toArray(new String[oldSet.size()]);
  }
View Full Code Here

        while (!intersection.isEmpty() && i.hasNext()) {
            ListData nextItem = asList((SimpleData) i.next());
            if (nextItem == null)
                intersection = Collections.EMPTY_SET;
            else
                intersection.retainAll(nextItem.asList());
        }

        return getResult(intersection);
    }
View Full Code Here

            Set declaredArtifacts = buildDeclaredArtifacts( project );
           
            Set usedArtifacts = buildUsedArtifacts( artifactClassMap, dependencyClasses );
           
            Set usedDeclaredArtifacts = new LinkedHashSet( declaredArtifacts );
            usedDeclaredArtifacts.retainAll( usedArtifacts );

            Set usedUndeclaredArtifacts = new LinkedHashSet( usedArtifacts );
            usedUndeclaredArtifacts = removeAll( usedUndeclaredArtifacts, declaredArtifacts );

            Set unusedDeclaredArtifacts = new LinkedHashSet( declaredArtifacts );
View Full Code Here

                if (!acls.contains(GroupPrincipal.ANY)) {
                    Subject subject = exchange.getMessage("in").getSecuritySubject();
                    if (subject == null) {
                        throw new SecurityException("User not authenticated");
                    }
                    acls.retainAll(subject.getPrincipals());
                    if (acls.size() == 0) {
                        throw new SecurityException("Endpoint is not authorized for this user");
                    }
                }
            }
View Full Code Here

          for (int i = 0; i < cells.length; i++) {
            all.addAll(getPorts(cells[i]));
            all.add(cells[i]);
          }
          all.addAll(DefaultGraphModel.getEdges(graphModel, cells));
          all.retainAll(visibleSet);
          all.remove(null);
          return all.toArray();
        }
      }
    }
View Full Code Here

    protected Token _add(Token rightArgument) throws IllegalActionException {
        RecordToken recordToken = (RecordToken) rightArgument;

        Set intersectionSet = new HashSet();
        intersectionSet.addAll(_fields.keySet());
        intersectionSet.retainAll(recordToken._fields.keySet());

        Iterator labels = intersectionSet.iterator();
        int size = intersectionSet.size();
        String[] newLabels = new String[size];
        Token[] newValues = new Token[size];
View Full Code Here

    protected Token _divide(Token rightArgument) throws IllegalActionException {
        RecordToken recordToken = (RecordToken) rightArgument;

        Set intersectionSet = new HashSet();
        intersectionSet.addAll(_fields.keySet());
        intersectionSet.retainAll(recordToken._fields.keySet());

        Iterator labels = intersectionSet.iterator();
        int size = intersectionSet.size();
        String[] newLabels = new String[size];
        Token[] newValues = new Token[size];
View Full Code Here

    protected Token _modulo(Token rightArgument) throws IllegalActionException {
        RecordToken recordToken = (RecordToken) rightArgument;

        Set intersectionSet = new HashSet();
        intersectionSet.addAll(_fields.keySet());
        intersectionSet.retainAll(recordToken._fields.keySet());

        Iterator labels = intersectionSet.iterator();
        int size = intersectionSet.size();
        String[] newLabels = new String[size];
        Token[] newValues = new Token[size];
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.