Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* ************************************************************************
 #
 #  DivConq
 #
 #  http://divconq.com/
 #
 #  Copyright:
 #    Copyright 2014 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.op;
Provides the same function support as

Parameters:
<T> the return type
Author(s):
Andy
See also:
OperationResult, however allows for more than a true/false return type. A specific return type may be provided using generics.
public class FuncResult<T> extends OperationResult {
	  protected T value = null;
	 
	  public FuncResult() {
		  super();
	  }
  
  

Returns:
function result if call was a success
	public T getResult() {
	    return this.;
	}
 
  

Parameters:
v result to use, set by the method called
	public void setResult(T v) {
	    this. = v;
	    
	    this.markEnd();
	}
	public boolean isNotEmptyResult() {
		return !Struct.objectIsEmpty(this.);
	}
	public boolean isEmptyResult() {
		return Struct.objectIsEmpty(this.);
	}
	public Message toLogMessage() {
		Message msg = super.toLogMessage();
		if (this. != null)
			msg.setField("Body"this.);
		return msg;
	}
New to GrepCode? Check out our FAQ X