padre-master/org.eclipse.epsilon.eol.engine/src/org/eclipse/epsilon/eol/execute/Return.java
/*******************************************************************************
 * Copyright (c) 2012 The University of York.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Dimitrios Kolovos - initial API and implementation
 ******************************************************************************/
package org.eclipse.epsilon.eol.execute;

public class Return {
	
	protected Object value;
	
	public Return(Object value) {
		this.value = value;
	}
	
	public void setValue(Object value) {
		this.value = value;
	}
	
	public Object getValue() {
		return value;
	}
	
	public static Object getValue(Object result) {
		if (result instanceof Return) {
			return ((Return) result).getValue();
		}
		else {
			return result;
		}
	}
	
}
