123456789101112131415161718192021222324252627282930 |
- package com.epson.mobilephone.common.wifidirect;
- import androidx.annotation.Nullable;
- public class EventWrapperWiFiDirect<T> {
- private boolean handled = false;
- private T mContent;
- public EventWrapperWiFiDirect(T t) {
- if (t != null) {
- mContent = t;
- return;
- }
- throw new IllegalArgumentException("null values in Event are not allowed.");
- }
- @Nullable
- public T getEventContent() {
- if (handled) {
- return null;
- }
- handled = true;
- return mContent;
- }
- public boolean hasBeenHandled() {
- return handled;
- }
- }
|