Examples of FastSet


Examples of com.sencha.gxt.core.shared.FastSet

          return;
        }
      }
    } else {
      ModelKeyProvider<? super M> kp = getWidget().getTreeStore().getKeyProvider();
      FastSet nonLeafKeys = new FastSet();
      for (M item : selected) {
        if (getWidget().isLeaf(item)) {
          if (treeGridSource == TreeSource.NODE) {
            event.setCancelled(true);
            return;
          }
        } else {
          nonLeafKeys.add(kp.getKey(item));
        }
      }
      for (int i = selected.size() - 1; i >= 0; i--) {
        // TODO consider tracking these parents, and if they are part of another
        // parent, adding them to the keyset
        M parent = selected.get(i);
        while ((parent = getWidget().getTreeStore().getParent(parent)) != null) {
          if (nonLeafKeys.contains(kp.getKey(parent))) {
            selected.remove(i);
          }
        }
      }
      for (M item : selected) {
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

    }
  }

  protected Set<String> getSet(TreeState state) {
    if (state.getExpandedKeys() == null) {
      state.setExpandedKeys(new FastSet());
    }
    return state.getExpandedKeys();
  }
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

  public ListStore(ModelKeyProvider<? super M> keyProvider) {
    super(keyProvider);
    visibleItems = allItems = new ArrayList<M>();

    if (ListStore.class.desiredAssertionStatus()) {
      debugKeys = new FastSet();
    }
  }
View Full Code Here

Examples of com.sencha.gxt.core.shared.FastSet

    }
    return newMap;
  }

  public Collection<String> getPropertyNames() {
    Set<String> set = new FastSet();
    if (map != null) {
      set.addAll(map.keySet());
    }
    return set;
  }
View Full Code Here

Examples of javolution.util.FastSet

            B1.addAll(B4);

            B2 = B4;
        }

        Set<BipartiteNode<T>> leftClone = new FastSet(U);
        Set<BipartiteNode<T>> rightClone = new FastSet(V);

        leftClone.removeAll(B1);
        rightClone.retainAll(B1);
        leftClone.addAll(rightClone);
        return leftClone;
    }
View Full Code Here

Examples of javolution.util.FastSet

        // end the shortest Edge-disjoint augmenting paths.
        // Side effect: For any Edge v.layer has the index of
        // the BFS layer to reach this Edge (or -1)
        // B: potential beginning of augmenting paths

        Set<BipartiteNode<T>> Q = new FastSet(B);
        // F: The set of free endings (the other side of augmenting paths)
        Set<BipartiteNode<T>> F = FastSet.newInstance();
        for (BipartiteNode<T> node : U) {
            node.layer = -1;
        }
        for (BipartiteNode<T> node : V) {
            node.layer = -1;
        }

        // The potential beginnings of augmenting paths are at layer 0.
        for (BipartiteNode<T> node : B) {
            node.layer = 0;
        }

        while (!Q.isEmpty()) {
            Set<BipartiteNode<T>> G = FastSet.newInstance();

            for (BipartiteNode<T> q : Q) {
                for (Edge<BipartiteNode<T>> v : edges) {
                    if (v.getSource() == q || v.getTarget() == q) {
                        BipartiteNode<T> p;
                        if (v.getSource() == q)
                            p = v.getTarget();
                        else
                            // (v.getTarget() == q)
                            p = v.getSource();
                        if (p.layer == -1) {
                            p.layer = q.layer + 1;
                            if (p.matching == null)
                                // Collect the free Edge, continue BFS
                                F.add(p);
                            else
                                G.add(p);
                        }
                    }
                }
            }
            if (!F.isEmpty())
                // Free vertices found, stop at this layer.
                return F;

            Q.clear();
            for (BipartiteNode<T> q : G) {
                // By construction, q matched.
                BipartiteNode<T> p = q.matching;
                p.layer = q.layer + 1;
                Q.add(p);
            }
        }

        return FastSet.newInstance();
    }
View Full Code Here

Examples of javolution.util.FastSet

        return getOutEdgeObjects().unmodifiable();
      } else {
        return getOutEdgeObjects(labels);
      }
    } else {
      FastSet result = new FastSet<Edge>();
      if (labels == null || labels.length == 0) {
        result.addAll(getInEdgeObjects());
        result.addAll(getOutEdgeObjects());
      } else {
        result.addAll(getInEdgeObjects(labels));
        result.addAll(getOutEdgeObjects(labels));
      }
      return result.unmodifiable();
    }
  }
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.