James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | import com.google.flatbuffers.FlatBufferBuilder; |
| 4 | |
| 5 | public class GadgetUnion { |
| 6 | private byte type; |
| 7 | private Object value; |
| 8 | |
| 9 | public byte getType() { return type; } |
| 10 | |
| 11 | public void setType(byte type) { this.type = type; } |
| 12 | |
| 13 | public Object getValue() { return value; } |
| 14 | |
| 15 | public void setValue(Object value) { this.value = value; } |
| 16 | |
| 17 | public GadgetUnion() { |
| 18 | this.type = Gadget.NONE; |
| 19 | this.value = null; |
| 20 | } |
| 21 | |
| 22 | public FallingTubT asFallingTub() { return (FallingTubT) value; } |
| 23 | public HandFanT asHandFan() { return (HandFanT) value; } |
| 24 | |
| 25 | public static int pack(FlatBufferBuilder builder, GadgetUnion _o) { |
| 26 | switch (_o.type) { |
| 27 | case Gadget.FallingTub: return FallingTub.pack(builder, _o.asFallingTub()); |
| 28 | case Gadget.HandFan: return HandFan.pack(builder, _o.asHandFan()); |
| 29 | default: return 0; |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | |