⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conditionalcontinuation.java

📁 一个很好的微工作流内核
💻 JAVA
字号:
/* * 	  *  Copyright (c) 2002, 2003 Dragos Manolescu (dam@micro-workflow.com) *  *  See the LICENSE file for licensing information. */package com.microworkflow.execution;import com.microworkflow.process.TestCondition;import com.microworkflow.process.WorkflowContext;/** * @author dam * * This continuation evaluates the test condition and returns to the trampoline * the continuation corresponding to the appropriate branch. */public class ConditionalContinuation extends Continuation {	protected TestCondition test;	protected Continuation thenContinuation;	protected Continuation elseContinuation;	public ConditionalContinuation(Continuation continuation) {		super(continuation, continuation.getWorkflow());	}	public void setElseContinuation(Continuation elseContinuation) {		this.elseContinuation = elseContinuation;	}	public void setThenContinuation(Continuation thenContinuation) {		this.thenContinuation = thenContinuation;	}	public void setTestCondition(TestCondition aBlock) {		test = aBlock;	}	public Continuation applyContinuationIn(WorkflowContext context) {		Continuation ret =			test.evaluateInContext(context) ? thenContinuation : elseContinuation;		resetState();		return ret;	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -