public class ResultWrapper<T>
extends java.lang.Object
Wrapps a result object so it can be used as method parameter and changed within the method.
This is useful especially for simple data types like Boolean
etc.
Example (usage):
public String myMethod(String oneParameter, ResultWrapper success){
__if (oneParameter.equals("foo")){
____success = success.setValue(false);
____return "Foo";
__}else{
____//don't change success
____return "All the best";
__}
}
Here a String is returned but the boolean value may also be changed and it's value is useable
by the calling method
- Since:
- 01.11.2008
- Version:
- 1.0
- Author:
- a.mueller