public final class

LiveDataObservable.Result<T>

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.impl.LiveDataObservable.Result<T>

Overview

A wrapper class that allows error reporting. A Result can contain either a value or an error, but not both.

Summary

Methods
public booleancompletedSuccessfully()

Returns whether this result contains a value or an error.

public java.lang.ThrowablegetError()

Returns the error contained within this result, or null if the result contains a value.

public java.lang.ObjectgetValue()

Returns the value contained within this result.

public java.lang.StringtoString()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods

public boolean completedSuccessfully()

Returns whether this result contains a value or an error.

A successful result will contain a value.

public java.lang.Object getValue()

Returns the value contained within this result.

public java.lang.Throwable getError()

Returns the error contained within this result, or null if the result contains a value.

public java.lang.String toString()