Returns the value if set or throws exception if there is no value set. This method is meant to be called after checking the return value of hasValue() first.
()
| 55 | * to be called after checking the return value of hasValue() first. |
| 56 | */ |
| 57 | public T getValue() { |
| 58 | if (status != null) { |
| 59 | throw new IllegalStateException("No value present."); |
| 60 | } |
| 61 | return value; |
| 62 | } |
| 63 | |
| 64 | /** Returns the status. If there is a value (which can be null), returns OK. */ |
| 65 | public Status getStatus() { |
no outgoing calls