public class Event<T>
extends java.lang.Object
androidx.lifecycle.LiveData
event with contentModifier and Type | Method and Description |
---|---|
T |
getContent() |
T |
getContentIfNotConsumed()
Retrieve assigned content based on if and only if content has not been referenced from
getContent() |
boolean |
isContentConsumed() |
public Event(T t)
public T getContent()
mIsContentConsumed
to true
that will also mean that getContentIfNotConsumed()
will also return true
public boolean isContentConsumed()
true
if content assigned to event is already referenced
from getContent()
; false
otherwise.public T getContentIfNotConsumed()
getContent()