1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 package MyGame; 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 MonsterExtra extends Table { getRootAsMonsterExtra(ByteBuffer _bb)12 public static MonsterExtra getRootAsMonsterExtra(ByteBuffer _bb) { return getRootAsMonsterExtra(_bb, new MonsterExtra()); } getRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra obj)13 public static MonsterExtra getRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra 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; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } __assign(int _i, ByteBuffer _bb)15 public MonsterExtra __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 16 testfNan()17 public float testfNan() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NaN; } mutateTestfNan(float testf_nan)18 public boolean mutateTestfNan(float testf_nan) { int o = __offset(4); if (o != 0) { bb.putFloat(o + bb_pos, testf_nan); return true; } else { return false; } } testfPinf()19 public float testfPinf() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : Float.POSITIVE_INFINITY; } mutateTestfPinf(float testf_pinf)20 public boolean mutateTestfPinf(float testf_pinf) { int o = __offset(6); if (o != 0) { bb.putFloat(o + bb_pos, testf_pinf); return true; } else { return false; } } testfNinf()21 public float testfNinf() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NEGATIVE_INFINITY; } mutateTestfNinf(float testf_ninf)22 public boolean mutateTestfNinf(float testf_ninf) { int o = __offset(8); if (o != 0) { bb.putFloat(o + bb_pos, testf_ninf); return true; } else { return false; } } testdNan()23 public double testdNan() { int o = __offset(10); return o != 0 ? bb.getDouble(o + bb_pos) : Double.NaN; } mutateTestdNan(double testd_nan)24 public boolean mutateTestdNan(double testd_nan) { int o = __offset(10); if (o != 0) { bb.putDouble(o + bb_pos, testd_nan); return true; } else { return false; } } testdPinf()25 public double testdPinf() { int o = __offset(12); return o != 0 ? bb.getDouble(o + bb_pos) : Double.POSITIVE_INFINITY; } mutateTestdPinf(double testd_pinf)26 public boolean mutateTestdPinf(double testd_pinf) { int o = __offset(12); if (o != 0) { bb.putDouble(o + bb_pos, testd_pinf); return true; } else { return false; } } testdNinf()27 public double testdNinf() { int o = __offset(14); return o != 0 ? bb.getDouble(o + bb_pos) : Double.NEGATIVE_INFINITY; } mutateTestdNinf(double testd_ninf)28 public boolean mutateTestdNinf(double testd_ninf) { int o = __offset(14); if (o != 0) { bb.putDouble(o + bb_pos, testd_ninf); return true; } else { return false; } } 29 createMonsterExtra(FlatBufferBuilder builder, float testf_nan, float testf_pinf, float testf_ninf, double testd_nan, double testd_pinf, double testd_ninf)30 public static int createMonsterExtra(FlatBufferBuilder builder, 31 float testf_nan, 32 float testf_pinf, 33 float testf_ninf, 34 double testd_nan, 35 double testd_pinf, 36 double testd_ninf) { 37 builder.startObject(6); 38 MonsterExtra.addTestdNinf(builder, testd_ninf); 39 MonsterExtra.addTestdPinf(builder, testd_pinf); 40 MonsterExtra.addTestdNan(builder, testd_nan); 41 MonsterExtra.addTestfNinf(builder, testf_ninf); 42 MonsterExtra.addTestfPinf(builder, testf_pinf); 43 MonsterExtra.addTestfNan(builder, testf_nan); 44 return MonsterExtra.endMonsterExtra(builder); 45 } 46 startMonsterExtra(FlatBufferBuilder builder)47 public static void startMonsterExtra(FlatBufferBuilder builder) { builder.startObject(6); } addTestfNan(FlatBufferBuilder builder, float testfNan)48 public static void addTestfNan(FlatBufferBuilder builder, float testfNan) { builder.addFloat(0, testfNan, Float.NaN); } addTestfPinf(FlatBufferBuilder builder, float testfPinf)49 public static void addTestfPinf(FlatBufferBuilder builder, float testfPinf) { builder.addFloat(1, testfPinf, Float.POSITIVE_INFINITY); } addTestfNinf(FlatBufferBuilder builder, float testfNinf)50 public static void addTestfNinf(FlatBufferBuilder builder, float testfNinf) { builder.addFloat(2, testfNinf, Float.NEGATIVE_INFINITY); } addTestdNan(FlatBufferBuilder builder, double testdNan)51 public static void addTestdNan(FlatBufferBuilder builder, double testdNan) { builder.addDouble(3, testdNan, Double.NaN); } addTestdPinf(FlatBufferBuilder builder, double testdPinf)52 public static void addTestdPinf(FlatBufferBuilder builder, double testdPinf) { builder.addDouble(4, testdPinf, Double.POSITIVE_INFINITY); } addTestdNinf(FlatBufferBuilder builder, double testdNinf)53 public static void addTestdNinf(FlatBufferBuilder builder, double testdNinf) { builder.addDouble(5, testdNinf, Double.NEGATIVE_INFINITY); } endMonsterExtra(FlatBufferBuilder builder)54 public static int endMonsterExtra(FlatBufferBuilder builder) { 55 int o = builder.endObject(); 56 return o; 57 } 58 } 59 60