Examples of Predicate


Examples of net.emaze.dysfunctional.dispatching.logic.Predicate

        new StringEqualsIgnoreCase("a").accept(null);
    }

    @Test(expected = ClassCastException.class)
    public void passingNonStringToErasureYieldsException() {
        Predicate p = new StringEqualsIgnoreCase("a");
        p.accept(new Object());
    }   
View Full Code Here

Examples of org.alfresco.webservice.types.Predicate

     
      Reference reference = new Reference();
      reference.setStore(STORE);
      reference.setUuid(row.getNode().getId());
     
      Predicate predicate = new Predicate();
      predicate.setStore(STORE);
      predicate.setNodes(new Reference[]{reference});
     
      CMLDelete cmlDelete = new CMLDelete();
      cmlDelete.setWhere(predicate);
     
      CML cml = new CML();
View Full Code Here

Examples of org.apache.ambari.server.controller.spi.Predicate

    // set expectations
    expect(dao.findByName(BLUEPRINT_NAME)).andReturn(blueprintEntity);
    dao.remove(capture(entityCapture));
    replay(dao);

    Predicate predicate = new EqualsPredicate<String>(
        BlueprintResourceProvider.BLUEPRINT_NAME_PROPERTY_ID, BLUEPRINT_NAME);

    AbstractResourceProviderTest.TestObserver observer = new AbstractResourceProviderTest.TestObserver();
    ((ObservableResourceProvider)provider).addObserver(observer);
View Full Code Here

Examples of org.apache.camel.Predicate

    public void setOnRedelivery(Processor onRedelivery) {
        this.onRedelivery = onRedelivery;
    }

    public Predicate getRetryWhilePolicy(CamelContext context) {
        Predicate answer = getRetryWhile();

        if (getRetryWhileRef() != null) {
            // its a bean expression
            Language bean = context.resolveLanguage("bean");
            answer = bean.createPredicate(getRetryWhileRef());
View Full Code Here

Examples of org.apache.commons.collections.Predicate

        return getBeans(metadata, BEAN_STATE_LESS);
    }

    public Collection getBeans(final Collection metadata, final int beanType) {
        return CollectionUtils.select(metadata,
            new Predicate() {
                public boolean evaluate(Object meta) {
                    JavaClass javaClass = (JavaClass) meta;
                    return hasFlag(getBeanType(javaClass), beanType);
                }
            });
View Full Code Here

Examples of org.apache.commons.collections.Predicate

        final boolean withIdentifiers)
    {
        final Collection properties = this.getProperties(follow);
        CollectionUtils.filter(
            properties,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean valid = true;
                    if (!withIdentifiers && object instanceof EntityAttribute)
View Full Code Here

Examples of org.apache.commons.collections.Predicate

        final Collection attributes = this.getAttributes(
                follow,
                withIdentifiers);
        CollectionUtils.filter(
            attributes,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean valid;
                    valid = ((AttributeFacade)object).isRequired();
View Full Code Here

Examples of org.apache.commons.collections.Predicate

        final Set properties = new LinkedHashSet(this.getProperties(
                    follow,
                    withIdentifiers));
        CollectionUtils.filter(
            properties,
            new Predicate()
            {
                public boolean evaluate(final Object object)
                {
                    boolean valid = false;
                    if (object instanceof AttributeFacade)
View Full Code Here

Examples of org.apache.commons.collections.Predicate

    public List handleGetAssociationEnds()
    {
        final List associationEnds = (List)this.shieldedElements(super.handleGetAssociationEnds());
        CollectionUtils.filter(
            associationEnds,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    return ((AssociationEndFacade)object).getOtherEnd().getType() instanceof Entity;
                }
View Full Code Here

Examples of org.apache.commons.collections.Predicate

     */
    private EntityAssociationEnd getForeignIdentifierEnd()
    {
        return (EntityAssociationEnd)CollectionUtils.find(
            this.getAssociationEnds(),
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean valid = false;
                    if (object != null && EntityAssociationEnd.class.isAssignableFrom(object.getClass()))
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.