Examples of FilterIterator


Examples of org.apache.commons.collections.iterators.FilterIterator

    @SuppressWarnings("unchecked")
    @Nonnull
    public static <T> Iterator<T> filter(Iterator<? extends T> iterator,
            final Predicate<? super T> predicate) {

        return new FilterIterator(iterator, new org.apache.commons.collections.Predicate() {
            @Override
            public boolean evaluate(Object object) {
                return predicate.evaluate((T) object);
            }
        });
View Full Code Here

Examples of org.apache.commons.collections.iterators.FilterIterator

     *
     * @param itemStates item state source iterator.
     * @return iterator over reference property states.
     */
    private Iterator filterReferenceProperties(Iterator itemStates) {
        return new FilterIterator(itemStates, new Predicate() {
            public boolean evaluate(Object object) {
                ItemState state = (ItemState) object;
                if (!state.isNode()) {
                    PropertyState prop = (PropertyState) state;
                    return prop.getType() == PropertyType.REFERENCE;
View Full Code Here

Examples of org.apache.ode.utils.stl.FilterIterator

    /**
     * @see NamespaceContext#getPrefixes
     */
    @SuppressWarnings("unchecked")
    public Iterator getPrefixes(final String uri) {
        return new TransformIterator(new FilterIterator(_prefixToUriMap.entrySet().iterator(),
                new CompositeUnaryFunction(new EqualsUnaryFunction(uri), CollectionsX.ufnMapEntry_getValue)),
                CollectionsX.ufnMapEntry_getKey);
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.core.util.FilterIterator

     * @return an iterator over the registered listeners
     */
    public <T extends Listener> Iterable<T> getListeners(final Class<T> type) {
        return new Iterable<T>() {
            public Iterator<T> iterator() {
                return new FilterIterator(getServices().iterator(), new Filter() {
                    public boolean match(Object endpoint) {
                        return type.isInstance(endpoint);
                    }
                });
            }
View Full Code Here

Examples of org.openrdf.query.algebra.evaluation.iterator.FilterIterator

  public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(Filter filter, BindingSet bindings)
    throws QueryEvaluationException
  {
    CloseableIteration<BindingSet, QueryEvaluationException> result;
    result = this.evaluate(filter.getArg(), bindings);
    result = new FilterIterator(filter, result, this);
    return result;
  }
View Full Code Here

Examples of prefuse.data.util.FilterIterator

            item.setDOI(Constants.MINIMUM_DOI);
        }
       
        // set up the graph traversal
        TupleSet src = m_vis.getGroup(m_sources);
        Iterator srcs = new FilterIterator(src.tuples(), m_groupP);
        m_bfs.init(srcs, m_distance, Constants.NODE_AND_EDGE_TRAVERSAL);
       
        // traverse the graph
        while ( m_bfs.hasNext() ) {
            VisualItem item = (VisualItem)m_bfs.next();
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.