while.java

来自「一个很好的微工作流内核」· Java 代码 · 共 36 行

JAVA
36
字号
/* * 	  *  Copyright (c) 2002, 2003 Dragos Manolescu (dam@micro-workflow.com) *  *  See the LICENSE file for licensing information. */package com.microworkflow.process;import com.microworkflow.execution.Continuation;import com.microworkflow.execution.WhileContinuation;public class While extends Activity {	protected Activity body;	protected TestCondition test;	public Continuation continuationWith(Continuation continuation) {		WhileContinuation k = continuation.makeRepetitionContinuation(this);		k.setTestCondition(test);		k.resetState();		return k;	}	public void setBody(Activity body) {		this.body = body;	}	public void setTestCondition(TestCondition aClosure) {		this.test = aClosure;	}		public void computeStateFor(Continuation k) {		((WhileContinuation)k).setBody(body.continuationWith(k));		}}

⌨️ 快捷键说明

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