Package org.apache.commons.collections.functors

Examples of org.apache.commons.collections.functors.InstanceofPredicate


    }

    @SuppressWarnings("unchecked")
    public <T> Collection<T> lookupObjects(Class<T> returntype)
    {
        return (Collection<T>) registryMap.select(new InstanceofPredicate(returntype));
    }
View Full Code Here


    if (conventions == null) conventions = new ArrayList<Convention>();
    return conventions;
  }
 
  public Collection<ModelConvention> getModelConventions() {
    Transformer transformer = new PredicateTransformer(new InstanceofPredicate(ModelConvention.class));
    return CollectionUtils.transformedCollection(getConventions(), transformer);
  }
View Full Code Here

    Transformer transformer = new PredicateTransformer(new InstanceofPredicate(ModelConvention.class));
    return CollectionUtils.transformedCollection(getConventions(), transformer);
  }
 
  public Collection<KernelConvention> getKernelConventions() {
    Transformer transformer = new PredicateTransformer(new InstanceofPredicate(KernelConvention.class));
    return CollectionUtils.transformedCollection(getConventions(), transformer);
  }
View Full Code Here

        assertTrue(predicate.evaluate(new TestBean("bar")));
    }

    public void testInstanceOf() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new InstanceofPredicate( String.class ));
        assertTrue(predicate.evaluate(new TestBean("foo")));
        assertTrue(predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected <T extends Span> Iterator<T> filter(
        final Class<T> clazz){
        return IteratorUtils.filteredIterator(
            getIterator(),
            new InstanceofPredicate(clazz));
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public <T> Collection<T> lookupObjects(Class<T> returntype)
    {
        return (Collection<T>) registryMap.select(new InstanceofPredicate(returntype));
    }
View Full Code Here

        assertTrue(predicate.evaluate(new TestBean("bar")));
    }

    public void testInstanceOf() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new InstanceofPredicate( String.class ));
        assertTrue(predicate.evaluate(new TestBean("foo")));
        assertTrue(predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

        assertTrue(predicate.evaluate(new TestBean("bar")));
    }

    public void testInstanceOf() {
        BeanPredicate predicate =
            new BeanPredicate("stringProperty",new InstanceofPredicate( String.class ));
        assertTrue(predicate.evaluate(new TestBean("foo")));
        assertTrue(predicate.evaluate(new TestBean("bar")));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.functors.InstanceofPredicate

Copyright © 2018 www.massapicom. 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.