Examples of Condition

@version $Id: Condition.java,v 1.2 2008/01/22 14:50:05 kebernet Exp $ @author Robert "kebernet" Cooper
  • org.rzo.yajsw.condition.Condition
  • org.rzo.yajsw.nettyutils.Condition
  • org.sonar.api.issue.condition.Condition
    @since 3.6
  • org.sonatype.mavenbook.weather.model.Condition
  • org.sonatype.nexus.capability.Condition
    An evaluable condition.
  • org.sonatype.nexus.client.core.Condition
    A condition to be satisfied by Nexus status in order for Nexus client to connect. @since 2.1
  • org.springframework.context.annotation.Condition
    A single {@code condition} that must be {@linkplain #matches matched} in orderfor a component to be registered.

    Conditions are checked immediately before the bean-definition is due to be registered and are free to veto registration based on any criteria that can be determined at that point.

    Conditions must follow the same restrictions as {@link BeanFactoryPostProcessor}and take care to never interact with bean instances. For more fine-grained control of conditions that interact with {@code @Configuration} beans consider the{@link ConfigurationCondition} interface. @author Phillip Webb @since 4.0 @see ConfigurationCondition @see Conditional @see ConditionContext

  • org.springmodules.validation.util.condition.Condition
    Represents a instantCondition that can be checked against an object. @author Uri Boness
  • org.teiid.language.Condition
    Represents criteria, which is also a boolean expression
  • org.teiid.query.processor.xml.Condition
    This is a condition which can be evaluated, and which supplies a Program instance which should act as the resulting sub Program to be run if the condition evaluates to true.
  • org.uengine.kernel.Condition
    @author Jinyoung Jang
  • org.w3c.css.sac.Condition
    @version $Revision: 1.3 $ @author Philippe Le Hegaret
  • org.w3c.flex.forks.css.sac.Condition
    @version $Revision: 1.3 $ @author Philippe Le Hegaret
  • org.xorm.query.Condition
  • pojo.Condition
    Condition generated by hbm2java
  • railo.transformer.bytecode.statement.Condition
  • robocode.Condition
    Condition is used to define custom {@link AdvancedRobot#waitFor(Condition) waitFor(Condition)} and custom events for an {@link AdvancedRobot}. The code below is taken from the sample robot named {@code sample.Target}. See the {@code sample/Target.java} for details.
     addCustomEvent( new Condition("triggerhit") { public boolean test() { return (getEnergy() <= trigger); }; } ); 
    You should note that by extending Condition this way, you are actually creating an inner class -- so if you distribute your robot, there will be multiple class files. (i.e. {@code Target$1.class}) @see AdvancedRobot#waitFor(Condition) @see AdvancedRobot#addCustomEvent(Condition) @see AdvancedRobot#removeCustomEvent(Condition) @see AdvancedRobot#onCustomEvent(CustomEvent) @author Mathew A. Nelson (original) @author Flemming N. Larsen (contributor) @author Nathaniel Troutman (contributor)
  • solver.constraints.nary.alldifferent.conditions.Condition
    A condition over integer variables

  • Examples of org.apache.activemq.util.Wait.Condition

            MessageProducer producer = session.createProducer(new ActiveMQTopic("VirtualTopic.T"));
            for (int i=0; i<maxSent; i++) {
                producer.send(session.createTextMessage("Hi" + i));
            }
           
            Wait.waitFor(new Condition() {
                public boolean isSatisified() throws Exception {
                    return maxSent == counterA.getCount() && maxSent == counterB.getCount();
                }
            });
            assertEquals(maxSent, counterA.getCount());
    View Full Code Here

    Examples of org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Condition

            r = increment(region, mutation, cellScanner);
            break;
          case PUT:
            Put put = ProtobufUtil.toPut(mutation, cellScanner);
            if (request.hasCondition()) {
              Condition condition = request.getCondition();
              byte[] row = condition.getRow().toByteArray();
              byte[] family = condition.getFamily().toByteArray();
              byte[] qualifier = condition.getQualifier().toByteArray();
              CompareOp compareOp = CompareOp.valueOf(condition.getCompareType().name());
              ByteArrayComparable comparator =
                ProtobufUtil.toComparator(condition.getComparator());
              if (region.getCoprocessorHost() != null) {
                processed = region.getCoprocessorHost().preCheckAndPut(
                  row, family, qualifier, compareOp, comparator, put);
              }
              if (processed == null) {
                boolean result = region.checkAndMutate(row, family,
                  qualifier, compareOp, comparator, put, true);
                if (region.getCoprocessorHost() != null) {
                  result = region.getCoprocessorHost().postCheckAndPut(row, family,
                    qualifier, compareOp, comparator, put, result);
                }
                processed = result;
              }
            } else {
              region.put(put);
              processed = Boolean.TRUE;
            }
            break;
          case DELETE:
            Delete delete = ProtobufUtil.toDelete(mutation, cellScanner);
            if (request.hasCondition()) {
              Condition condition = request.getCondition();
              byte[] row = condition.getRow().toByteArray();
              byte[] family = condition.getFamily().toByteArray();
              byte[] qualifier = condition.getQualifier().toByteArray();
              CompareOp compareOp = CompareOp.valueOf(condition.getCompareType().name());
              ByteArrayComparable comparator =
                ProtobufUtil.toComparator(condition.getComparator());
              if (region.getCoprocessorHost() != null) {
                processed = region.getCoprocessorHost().preCheckAndDelete(
                  row, family, qualifier, compareOp, comparator, delete);
              }
              if (processed == null) {
    View Full Code Here

    Examples of org.apache.jackrabbit.core.security.user.XPathQueryBuilder.Condition

            if (bound != null && offset > 0) {
                log.warn("Found bound {} and offset {} in limit. Discarding offset.", bound, offset);
                offset = 0;
            }

            Condition condition = builder.getCondition();
            String sortCol = builder.getSortProperty();
            Direction sortDir = builder.getSortDirection();
            if (bound != null) {
                if (sortCol == null) {
                    log.warn("Ignoring bound {} since no sort order is specified");
                } else {
                    Condition boundCondition = builder.property(sortCol, getCollation(sortDir), bound);
                    condition = condition == null
                            ? boundCondition
                            : builder.and(condition, boundCondition);
                }
            }
    View Full Code Here

    Examples of org.apache.jackrabbit.oak.plugins.observation.filter.FilterBuilder.Condition

    public class FilterBuilderTest {

        @Test
        public void allShortcutsExcludeAll() {
            FilterBuilder builder = new FilterBuilder();
            Condition condition = builder.all(
                    builder.path("path"),
                    builder.excludeAll(),
                    builder.path("path"));
            assertEquals(ConstantFilter.EXCLUDE_ALL, condition.createFilter(EMPTY_NODE, EMPTY_NODE, "/"));
        }
    View Full Code Here

    Examples of org.apache.lenya.cms.workflow.Condition

       
        /** Returns if the transition can fire in a certain situation.
         *
         */
        public boolean canFire(Situation situation) {
            Condition conditions[] = getConditions();
            boolean canFire = true;
            for (int i = 0; i < conditions.length; i++) {
                if (!conditions[i].isComplied(situation)) {
                    canFire = false;
                }
    View Full Code Here

    Examples of org.apache.lenya.workflow.Condition

         * @throws WorkflowException when creating the condition failed.
         */
        protected static Condition createCondition(String className, String expression)
            throws WorkflowException {

            Condition condition;

            try {
                Class clazz = Class.forName(className);
                condition = (Condition) clazz.newInstance();
                condition.setExpression(expression);
            } catch (ClassNotFoundException e) {
                throw new WorkflowException(e);
            } catch (InstantiationException e) {
                throw new WorkflowException(e);
            } catch (IllegalAccessException e) {
    View Full Code Here

    Examples of org.apache.qpid.util.concurrent.Condition

            return conn;
        }

        public void testClosedNotificationAndWriteToClosed() throws Exception
        {
            Condition closed = new Condition();
            Connection conn = connect(closed);
            if (!closed.get(3000))
            {
                fail("never got notified of connection close");
            }

            Channel ch = conn.getChannel(0);
    View Full Code Here

    Examples of org.apache.sling.testing.tools.retry.RetryLoop.Condition

                final String [] scripts = { "jsp1.jsp", "jsp2.jsp" };
                for(String script : scripts) {
                    toDelete = H.uploadTestScript(unstructuredNode.scriptPath, script, "html.jsp");
                    final String expected = "text from " + script + ":" + unstructuredNode.testText;
                   
                    final Condition c = new Condition() {

                        public String getDescription() {
                            return "Expecting " + expected;
                        }
    View Full Code Here

    Examples of org.apache.synapse.commons.evaluators.Condition

    */
    public class ConditionFactory {
        private Log log = LogFactory.getLog(ConditionFactory.class);

        public Condition createCondition(OMElement ruleElement) throws EvaluatorException {
            Condition r = new Condition();

            OMAttribute priorityAtt = ruleElement.getAttribute(new QName(EvaluatorConstants.PRIORITY));

            if (priorityAtt != null) {
                int p = Integer.parseInt(priorityAtt.getAttributeValue());
                r.setPriority(p);
            }

            OMElement ce = ruleElement.getFirstElement();

            EvaluatorFactory ef = EvaluatorFactoryFinder.getInstance().
                    findEvaluatorFactory(ce.getLocalName());

            if (ef == null) {
                handleException("Invalid configuration element: " + ce.getLocalName());
                return null;
            }

            Evaluator evaluator = ef.create(ce);

            r.setEvaluator(evaluator);
            return r;
        }
    View Full Code Here

    Examples of org.apache.tapestry5.plastic.Condition

                            if (returnType == double.class)
                            {
                                builder.loadConstant(0d).compareSpecial("double");
                            }

                            Condition condition = returnType.isPrimitive() ? Condition.NON_ZERO : Condition.NON_NULL;

                            builder.when(condition, new WhenCallback()
                            {
                                public void ifTrue(InstructionBuilder builder)
                                {
    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.