Package java.util

Examples of java.util.HashSet.retainAll()


        Collection picked = vv.getPickedVertexState().getPicked();
        if(picked.size() == 2) {
          Pair pair = new Pair(picked);
          Graph graph = layout.getGraph();
          Collection edges = new HashSet(graph.getIncidentEdges(pair.getFirst()));
          edges.retainAll(graph.getIncidentEdges(pair.getSecond()));
          exclusions.addAll(edges);
          vv.repaint();
        }
       
      }});
View Full Code Here


        Collection picked = vv.getPickedVertexState().getPicked();
        if(picked.size() == 2) {
          Pair pair = new Pair(picked);
          Graph graph = layout.getGraph();
          Collection edges = new HashSet(graph.getIncidentEdges(pair.getFirst()));
          edges.retainAll(graph.getIncidentEdges(pair.getSecond()));
          exclusions.removeAll(edges);
          vv.repaint();
        }
       
      }});
View Full Code Here

        String extendedPattern = "Name: {0,upper} ";
        String pattern = extendedPattern + builtinsPattern;

        HashSet testLocales = new HashSet();
        testLocales.addAll(Arrays.asList(DateFormat.getAvailableLocales()));
        testLocales.retainAll(Arrays.asList(NumberFormat.getAvailableLocales()));
        testLocales.add(null);

        for (Iterator l = testLocales.iterator(); l.hasNext();) {
            Locale locale = (Locale) l.next();
            MessageFormat builtins = createMessageFormat(builtinsPattern, locale);
View Full Code Here

        });
       
        storedUserChecked.addAll(newCheckedUsers);
       
        Set usersUnclicked = new HashSet(storedUserChecked);
        usersUnclicked.retainAll(usersShown);
        usersUnclicked.removeAll(newCheckedUsers);
        storedUserChecked.removeAll(usersUnclicked);
    }

    private User[] searchUsers(String request, Integer from, Integer howMany) {
View Full Code Here

                                                FontRenderContext frc) {

        Set keys = aci.getAllAttributeKeys();
        Set glyphPositionKeys = new HashSet();
        glyphPositionKeys.add(TextAttribute.BIDI_EMBEDDING);
        glyphPositionKeys.retainAll(keys);

        if (glyphPositionKeys.isEmpty() ||
            (aci.getAttribute(TextAttribute.RUN_DIRECTION) ==
       TextAttribute.RUN_DIRECTION_RTL)) {
            return new TextLayoutAdapter(new TextLayout(aci, frc), offset, aci);
View Full Code Here

            if (_deleted != null && fkTables != null)
            {
                HashSet intersection = (HashSet) _deleted.clone();

                intersection.retainAll(fkTables);
                if (!intersection.isEmpty())
                {
                    // one of the previous DELETEs contained a table
                    // that is referenced from this table.
                    // Let's execute that previous DELETE right now so that
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

  }

  public boolean retainAll(Collection c) {
    getterCalled();
    Set set = new HashSet(wrappedSet);
    boolean changed = set.retainAll(c);
    if (changed) {
      SetDiff diff = Diffs.computeSetDiff(wrappedSet, set);
      wrappedSet = set;
      updateTargetSet(diff);
      fireSetChange(diff);
View Full Code Here

    Set set = getSet();
    if (set.isEmpty())
      return false;

    Set removals = new HashSet(c);
    removals.retainAll(set);

    if (removals.isEmpty())
      return false;

    SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, removals);
View Full Code Here

        if (nodeTypeNames != null) {
            Set eventTypes = new HashSet();
            eventTypes.addAll(Arrays.asList(event.getMixinTypeNames()));
            eventTypes.add(event.getPrimaryNodeTypeName());
            // create intersection
            eventTypes.retainAll(nodeTypeNames);
            if (eventTypes.isEmpty()) {
                return false;
            }
        }
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.