Examples of FilteredIterator


Examples of com.ibm.commons.util.FilteredIterator

     * Get all prefixes for the specified Namespace URI in this namespace context.
     * @fbscript
     */
    public Iterator getPrefixes(final String namespaceURI) {
      return new IteratorWrapper(
          new FilteredIterator(definitions.values().iterator()) {
            protected boolean accept( Object object ) {
              Definition d = (Definition)object;
              return StringUtil.equals(d.uri, namespaceURI);
            }
          }) {
View Full Code Here

Examples of diva.util.FilteredIterator

     */
    public Iterator intersectingNodes(Rectangle2D r) {
        final GraphModel model = _controller.getGraphModel();
        ZList zlist = getGraphicsPane().getForegroundLayer().getFigures();
        Iterator i = zlist.getIntersectedFigures(r).figuresFromFront();
        Iterator j = new FilteredIterator(i, new Filter() {
            public boolean accept(Object o) {
                Figure f = (Figure) o;
                return (model.isNode(f.getUserObject()));
            }
        });
View Full Code Here

Examples of diva.util.FilteredIterator

     * intersect the given rectangle.
     */
    public Iterator intersectingEdges(Rectangle2D r) {
        ZList zlist = getGraphicsPane().getForegroundLayer().getFigures();
        Iterator i = zlist.getIntersectedFigures(r).figuresFromFront();
        Iterator j = new FilteredIterator(i, new Filter() {
            public boolean accept(Object o) {
                return (o instanceof Connector);
            }
        });
        return new ProxyIterator(j) {
View Full Code Here

Examples of diva.util.FilteredIterator

     * have the given element type.
     *
     *  @return an Iterator of XmlElements
     */
    public Iterator elements(final String type) {
        return new FilteredIterator(elements(), new Filter() {
            public boolean accept(Object o) {
                return ((XmlElement) o)._type.equals(type);
            }
        });
    }
View Full Code Here

Examples of diva.util.FilteredIterator

     * (i.e. the edges whose head node, or tail node is in the
     * composite, or a subnode).
     */
    public static final Iterator partiallyContainedEdges(Object composite,
            GraphModel model) {
        return new FilteredIterator(edgeSet(model.getRoot(), model).iterator(),
                new PartiallyContainedEdgeFilter(model, composite));
    }
View Full Code Here

Examples of diva.util.FilteredIterator

     * (i.e. the edges whose head and tail nodes are both in the
     * composite, or a subnode).
     */
    public static final Iterator totallyContainedEdges(Object composite,
            GraphModel model) {
        return new FilteredIterator(edgeSet(model.getRoot(), model).iterator(),
                new TotallyContainedEdgeFilter(model, composite));
    }
View Full Code Here

Examples of diva.util.FilteredIterator

     * @return An iterator over the hit figures.
     */
    public static Iterator pickIter(Iterator i, Rectangle2D region) {
        final Rectangle2D rl = region;

        return new FilteredIterator(i, new Filter() {
            Rectangle2D _region = rl;

            public boolean accept(Object o) {
                Figure f = (Figure) o;
                return f.hit(_region);
View Full Code Here

Examples of org.gwtoolbox.commons.collections.client.FilteredIterator

            this.nodes = nodes;
        }

        @SuppressWarnings("unchecked")
        public Iterator<Element> iterator() {
            return new FilteredIterator(new NodeListIterator(nodes), new AbstractPredicate<Node>() {
                public boolean eval(Node node) {
                    return node.getNodeType() == Node.ELEMENT_NODE;
                }
            });
        }
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.