Package: org.gradle.tooling.connection

## [Java] Interface ModelResult<T>

- The result of a model request.

  Parameters:
    `` - Type of model in the result
  Since:
    2.13

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `GradleConnectionException` | `getFailure()` The failure retrieving the model.
    `T` | `getModel()` Returns the model produced.

- - ### Method Detail

    - #### @Nullable public GradleConnectionException getFailure()

      The failure retrieving the model. If this value is not null, further details can be obtained by casting to FailedModelResult.

      Returns:
        the failure, or null if the result was successful.

    - #### public T getModel()

      Returns the model produced.

      throws:
        GradleConnectionException if the model could not be retrieved.
      Returns:
        the model, never null.