Examples of InstanceOfPredicate


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

    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

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

        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

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

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

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

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

        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

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

        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

Examples of org.jitterbit.functors.predicate.InstanceOfPredicate

        }
       
        private OrderedSelection getNewSelection() {
            List<Object> selectedProperties = tree.getSelectedNodes()
                .transform(NodeFunctions.toUserObject())
                .keepAll(new InstanceOfPredicate(MessageProperty.class));
            return SelectionFactory.newOrderedSelection(selectedProperties);
        }
View Full Code Here

Examples of org.jitterbit.functors.predicate.InstanceOfPredicate

        }
        throw new RuntimeException("Unexpected node encountered: " + node);
    }

    private Object getNodeAfterOperationNode(OperationWrapperNode current) {
        List<? extends GraphEdge> outgoing = current.getOutgoingRoutes().findAll(new InstanceOfPredicate(OperationActivityEdge.class));
        if (outgoing.isEmpty()) {
            return getStartNode();
        }
        Set<Object> nextNodes = new HashSet<Object>();
        for (GraphEdge out : outgoing) {
View Full Code Here

Examples of org.jitterbit.functors.predicate.InstanceOfPredicate

    private OperationWrapperNode getStartNode() {
        return graph.getModel().getStartNode();
    }

    private Object getPreviousTopLevelNode(AbstractGraphNode current) {
        List<? extends GraphEdge> incoming = current.getIncomingRoutes().findAll(new InstanceOfPredicate(OperationActivityEdge.class));
        if (incoming.isEmpty()) {
            return current;
        }
        Set<Object> nextNodes = Sets.newHashSet();
        for (GraphEdge out : incoming) {
View Full Code Here

Examples of org.jitterbit.functors.predicate.InstanceOfPredicate

        }

        @Override
        protected Transferable createTransferable(JComponent c) {
            KongaTree tree = (KongaTree) c;
            KList<KongaTreeNode> nodes = tree.getSelectedNodes().keepAll(new InstanceOfPredicate(DataElementNode.class));
            switch (nodes.size()) {
            case 0:
                return null;
            case 1:
                String name = nameExtractor.apply(nodes.get(0));
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.