/* ************************************************************************
#
#  DivConq
#
#  http://divconq.com/
#
#  Copyright:
#    Copyright 2012 eTimeline, LLC. All rights reserved.
#
#  License:
#    See the license.txt file in the project's top-level directory for details.
#
#  Authors:
#    * Andy White
#
************************************************************************ */
package divconq.lang;

/**
 * Provides the same function support as @see OperationResult, however allows for more
 * than a true/false return type.  A specific return type may be provided using generics.
 * 
 * @author Andy
 *
 * @param <T> the return type
 */
public class FuncResult<T> extends OperationResult {
	  protected T value = null;
	 
	  public FuncResult(boolean autolog) {
		  super(autolog);
	  }
	  
	  /**
	 * @return function result if call was a success
	 */
	public T getResult() {
	    return this.value;
	  }
		 
	  /**
	 * @param v result to use, set by the method called
	 */
	public void setResult(T v) {
	    this.value = v;
	  }
}
