MCPcopy Index your code
hub / github.com/grpc/grpc-java / getValue

Method getValue

api/src/main/java/io/grpc/StatusOr.java:57–62  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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() {

Calls

no outgoing calls