2023-04-11 21:29:23 +00:00
|
|
|
package dev.toad.msg;
|
|
|
|
|
2023-04-11 22:42:44 +00:00
|
|
|
import dev.toad.ffi.u16;
|
|
|
|
|
2023-04-11 21:29:23 +00:00
|
|
|
public final class Id {
|
|
|
|
|
2023-04-17 01:01:54 +00:00
|
|
|
public static native Id defaultId();
|
|
|
|
|
2023-04-11 22:42:44 +00:00
|
|
|
final u16 id;
|
2023-04-11 21:29:23 +00:00
|
|
|
|
|
|
|
public Id(int id) {
|
2023-04-11 22:42:44 +00:00
|
|
|
this.id = new u16(id);
|
2023-04-11 21:29:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public int toInt() {
|
2023-04-11 22:42:44 +00:00
|
|
|
return this.id.intValue();
|
2023-04-11 21:29:23 +00:00
|
|
|
}
|
|
|
|
}
|