1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 package MyGame.Example;
4 
5 import java.nio.*;
6 import java.lang.*;
7 import java.util.*;
8 import com.google.flatbuffers.*;
9 
10 @SuppressWarnings("unused")
11 public final class TestSimpleTableWithEnum extends Table {
getRootAsTestSimpleTableWithEnum(ByteBuffer _bb)12   public static TestSimpleTableWithEnum getRootAsTestSimpleTableWithEnum(ByteBuffer _bb) { return getRootAsTestSimpleTableWithEnum(_bb, new TestSimpleTableWithEnum()); }
getRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj)13   public static TestSimpleTableWithEnum getRootAsTestSimpleTableWithEnum(ByteBuffer _bb, TestSimpleTableWithEnum obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
__init(int _i, ByteBuffer _bb)14   public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
__assign(int _i, ByteBuffer _bb)15   public TestSimpleTableWithEnum __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
16 
color()17   public byte color() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 2; }
mutateColor(byte color)18   public boolean mutateColor(byte color) { int o = __offset(4); if (o != 0) { bb.put(o + bb_pos, color); return true; } else { return false; } }
19 
createTestSimpleTableWithEnum(FlatBufferBuilder builder, byte color)20   public static int createTestSimpleTableWithEnum(FlatBufferBuilder builder,
21       byte color) {
22     builder.startObject(1);
23     TestSimpleTableWithEnum.addColor(builder, color);
24     return TestSimpleTableWithEnum.endTestSimpleTableWithEnum(builder);
25   }
26 
startTestSimpleTableWithEnum(FlatBufferBuilder builder)27   public static void startTestSimpleTableWithEnum(FlatBufferBuilder builder) { builder.startObject(1); }
addColor(FlatBufferBuilder builder, byte color)28   public static void addColor(FlatBufferBuilder builder, byte color) { builder.addByte(0, color, 2); }
endTestSimpleTableWithEnum(FlatBufferBuilder builder)29   public static int endTestSimpleTableWithEnum(FlatBufferBuilder builder) {
30     int o = builder.endObject();
31     return o;
32   }
33 }
34 
35