|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.branchnbound.core.Result
A wrapper for a solution.
Constructor Summary | |
Result()
Construct an empty result. |
|
Result(java.lang.Exception e)
Construct a new result with an excpetion. |
|
Result(java.lang.Object theSolution)
Construct a new result with an attached value. |
Method Summary | |
java.lang.Exception |
getException()
|
java.lang.Object |
getSolution()
|
boolean |
isAnException()
|
boolean |
isBetterThan(Result other)
Compare 2 results. |
Result |
returnTheBest(Result other)
Compare 2 results and return which is the best. |
void |
setSolution(java.lang.Object theSolution)
Attach a value to this result. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Result()
public Result(java.lang.Object theSolution)
theSolution
- the value of the result.public Result(java.lang.Exception e)
e
- the exception.Method Detail |
public java.lang.Object getSolution()
null
if no value is
attached.public java.lang.Exception getException()
null
else.public void setSolution(java.lang.Object theSolution)
theSolution
- the value.public Result returnTheBest(Result other)
other
- the other result.
public java.lang.String toString()
Object.toString()
public boolean isBetterThan(Result other)
other
- the other result.
true
this is better than the other, else returns false
.public boolean isAnException()
true
if this result contains an exception, else false
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |