Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
14 lines
381 B
Java
14 lines
381 B
Java
// An ordinary (identity) record. No value classes anywhere in this file.
|
|
import java.util.List;
|
|
|
|
record Node(String label, List<Node> edges) {
|
|
static void nullCheck(Object arg, Object owner) {
|
|
if (arg == null) throw new IllegalArgumentException("null arg for " + owner);
|
|
}
|
|
|
|
public Node {
|
|
nullCheck(label, this);
|
|
nullCheck(edges, this);
|
|
}
|
|
}
|