Reformatted

This commit is contained in:
Finn
2026-01-16 21:53:46 +01:00
parent 2a657f3a83
commit 1e95252f94
18 changed files with 155 additions and 151 deletions

View File

@@ -7,27 +7,11 @@ 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 record UiEvent(String targetId, String type, 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;
}
}