first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package org.openautonomousconnection.luascript.events;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Event passed from host into Lua.
|
||||
*/
|
||||
public final class UiEvent {
|
||||
|
||||
private final String targetId;
|
||||
private final String type;
|
||||
private final Map<String, Object> data;
|
||||
|
||||
public UiEvent(String targetId, String type, Map<String, Object> data) {
|
||||
this.targetId = Objects.requireNonNull(targetId, "targetId");
|
||||
this.type = Objects.requireNonNull(type, "type");
|
||||
this.data = (data == null) ? Collections.emptyMap() : Collections.unmodifiableMap(data);
|
||||
}
|
||||
|
||||
public String targetId() {
|
||||
return targetId;
|
||||
}
|
||||
|
||||
public String type() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public Map<String, Object> data() {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user