Package java.util

Examples of java.util.HashSet.retainAll()


         {
            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;
View Full Code Here


                GVTAttributedCharacterIterator.TextAttribute.ROTATION);
        glyphPositionKeys.add(
                GVTAttributedCharacterIterator.TextAttribute.BASELINE_SHIFT);
        glyphPositionKeys.add(
                GVTAttributedCharacterIterator.TextAttribute.TEXTPATH);
        glyphPositionKeys.retainAll(keys);

        Vector fontFamilies = (Vector)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);

        if (fontFamilies == null) {
            fontFamilies = new Vector();
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

        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

        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

    for (int i = 0; i < nNodes; i++) {
      int iNode = order[i];
      if (cliques[iNode] != null) {
        Set separator = new HashSet();
        separator.addAll(cliques[iNode]);
        separator.retainAll(processedNodes);
        separators[iNode] = separator;
        processedNodes.addAll(cliques[iNode]);
      }
    }
    return separators;
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 Set knownEdit2(String word) {
    Set typos = new HashSet();
    for (Iterator itr = typos.iterator(); itr.hasNext();) {
      typos.addAll(edit1(word));
    }
    typos.retainAll(wordFrequency.keySet());
    return typos;
  }

  public static void main(String[] args) throws Exception {
    NaiveBayesianSpellChecker checker = new NaiveBayesianSpellChecker(
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.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

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.