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