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 { ValidateVersion()12 public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } getRootAsMonsterExtra(ByteBuffer _bb)13 public static MonsterExtra getRootAsMonsterExtra(ByteBuffer _bb) { return getRootAsMonsterExtra(_bb, new MonsterExtra()); } getRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra obj)14 public static MonsterExtra getRootAsMonsterExtra(ByteBuffer _bb, MonsterExtra obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } MonsterExtraBufferHasIdentifier(ByteBuffer _bb)15 public static boolean MonsterExtraBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "MONE"); } __init(int _i, ByteBuffer _bb)16 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } __assign(int _i, ByteBuffer _bb)17 public MonsterExtra __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 18 d0()19 public double d0() { int o = __offset(4); return o != 0 ? bb.getDouble(o + bb_pos) : Double.NaN; } mutateD0(double d0)20 public boolean mutateD0(double d0) { int o = __offset(4); if (o != 0) { bb.putDouble(o + bb_pos, d0); return true; } else { return false; } } d1()21 public double d1() { int o = __offset(6); return o != 0 ? bb.getDouble(o + bb_pos) : Double.NaN; } mutateD1(double d1)22 public boolean mutateD1(double d1) { int o = __offset(6); if (o != 0) { bb.putDouble(o + bb_pos, d1); return true; } else { return false; } } d2()23 public double d2() { int o = __offset(8); return o != 0 ? bb.getDouble(o + bb_pos) : Double.POSITIVE_INFINITY; } mutateD2(double d2)24 public boolean mutateD2(double d2) { int o = __offset(8); if (o != 0) { bb.putDouble(o + bb_pos, d2); return true; } else { return false; } } d3()25 public double d3() { int o = __offset(10); return o != 0 ? bb.getDouble(o + bb_pos) : Double.NEGATIVE_INFINITY; } mutateD3(double d3)26 public boolean mutateD3(double d3) { int o = __offset(10); if (o != 0) { bb.putDouble(o + bb_pos, d3); return true; } else { return false; } } f0()27 public float f0() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NaN; } mutateF0(float f0)28 public boolean mutateF0(float f0) { int o = __offset(12); if (o != 0) { bb.putFloat(o + bb_pos, f0); return true; } else { return false; } } f1()29 public float f1() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NaN; } mutateF1(float f1)30 public boolean mutateF1(float f1) { int o = __offset(14); if (o != 0) { bb.putFloat(o + bb_pos, f1); return true; } else { return false; } } f2()31 public float f2() { int o = __offset(16); return o != 0 ? bb.getFloat(o + bb_pos) : Float.POSITIVE_INFINITY; } mutateF2(float f2)32 public boolean mutateF2(float f2) { int o = __offset(16); if (o != 0) { bb.putFloat(o + bb_pos, f2); return true; } else { return false; } } f3()33 public float f3() { int o = __offset(18); return o != 0 ? bb.getFloat(o + bb_pos) : Float.NEGATIVE_INFINITY; } mutateF3(float f3)34 public boolean mutateF3(float f3) { int o = __offset(18); if (o != 0) { bb.putFloat(o + bb_pos, f3); return true; } else { return false; } } dvec(int j)35 public double dvec(int j) { int o = __offset(20); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; } dvecLength()36 public int dvecLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } dvecVector()37 public DoubleVector dvecVector() { return dvecVector(new DoubleVector()); } dvecVector(DoubleVector obj)38 public DoubleVector dvecVector(DoubleVector obj) { int o = __offset(20); return o != 0 ? obj.__assign(__vector(o), bb) : null; } dvecAsByteBuffer()39 public ByteBuffer dvecAsByteBuffer() { return __vector_as_bytebuffer(20, 8); } dvecInByteBuffer(ByteBuffer _bb)40 public ByteBuffer dvecInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 8); } mutateDvec(int j, double dvec)41 public boolean mutateDvec(int j, double dvec) { int o = __offset(20); if (o != 0) { bb.putDouble(__vector(o) + j * 8, dvec); return true; } else { return false; } } fvec(int j)42 public float fvec(int j) { int o = __offset(22); return o != 0 ? bb.getFloat(__vector(o) + j * 4) : 0; } fvecLength()43 public int fvecLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; } fvecVector()44 public FloatVector fvecVector() { return fvecVector(new FloatVector()); } fvecVector(FloatVector obj)45 public FloatVector fvecVector(FloatVector obj) { int o = __offset(22); return o != 0 ? obj.__assign(__vector(o), bb) : null; } fvecAsByteBuffer()46 public ByteBuffer fvecAsByteBuffer() { return __vector_as_bytebuffer(22, 4); } fvecInByteBuffer(ByteBuffer _bb)47 public ByteBuffer fvecInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 22, 4); } mutateFvec(int j, float fvec)48 public boolean mutateFvec(int j, float fvec) { int o = __offset(22); if (o != 0) { bb.putFloat(__vector(o) + j * 4, fvec); return true; } else { return false; } } 49 createMonsterExtra(FlatBufferBuilder builder, double d0, double d1, double d2, double d3, float f0, float f1, float f2, float f3, int dvecOffset, int fvecOffset)50 public static int createMonsterExtra(FlatBufferBuilder builder, 51 double d0, 52 double d1, 53 double d2, 54 double d3, 55 float f0, 56 float f1, 57 float f2, 58 float f3, 59 int dvecOffset, 60 int fvecOffset) { 61 builder.startTable(11); 62 MonsterExtra.addD3(builder, d3); 63 MonsterExtra.addD2(builder, d2); 64 MonsterExtra.addD1(builder, d1); 65 MonsterExtra.addD0(builder, d0); 66 MonsterExtra.addFvec(builder, fvecOffset); 67 MonsterExtra.addDvec(builder, dvecOffset); 68 MonsterExtra.addF3(builder, f3); 69 MonsterExtra.addF2(builder, f2); 70 MonsterExtra.addF1(builder, f1); 71 MonsterExtra.addF0(builder, f0); 72 return MonsterExtra.endMonsterExtra(builder); 73 } 74 startMonsterExtra(FlatBufferBuilder builder)75 public static void startMonsterExtra(FlatBufferBuilder builder) { builder.startTable(11); } addD0(FlatBufferBuilder builder, double d0)76 public static void addD0(FlatBufferBuilder builder, double d0) { builder.addDouble(0, d0, Double.NaN); } addD1(FlatBufferBuilder builder, double d1)77 public static void addD1(FlatBufferBuilder builder, double d1) { builder.addDouble(1, d1, Double.NaN); } addD2(FlatBufferBuilder builder, double d2)78 public static void addD2(FlatBufferBuilder builder, double d2) { builder.addDouble(2, d2, Double.POSITIVE_INFINITY); } addD3(FlatBufferBuilder builder, double d3)79 public static void addD3(FlatBufferBuilder builder, double d3) { builder.addDouble(3, d3, Double.NEGATIVE_INFINITY); } addF0(FlatBufferBuilder builder, float f0)80 public static void addF0(FlatBufferBuilder builder, float f0) { builder.addFloat(4, f0, Float.NaN); } addF1(FlatBufferBuilder builder, float f1)81 public static void addF1(FlatBufferBuilder builder, float f1) { builder.addFloat(5, f1, Float.NaN); } addF2(FlatBufferBuilder builder, float f2)82 public static void addF2(FlatBufferBuilder builder, float f2) { builder.addFloat(6, f2, Float.POSITIVE_INFINITY); } addF3(FlatBufferBuilder builder, float f3)83 public static void addF3(FlatBufferBuilder builder, float f3) { builder.addFloat(7, f3, Float.NEGATIVE_INFINITY); } addDvec(FlatBufferBuilder builder, int dvecOffset)84 public static void addDvec(FlatBufferBuilder builder, int dvecOffset) { builder.addOffset(8, dvecOffset, 0); } createDvecVector(FlatBufferBuilder builder, double[] data)85 public static int createDvecVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); } startDvecVector(FlatBufferBuilder builder, int numElems)86 public static void startDvecVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } addFvec(FlatBufferBuilder builder, int fvecOffset)87 public static void addFvec(FlatBufferBuilder builder, int fvecOffset) { builder.addOffset(9, fvecOffset, 0); } createFvecVector(FlatBufferBuilder builder, float[] data)88 public static int createFvecVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); } startFvecVector(FlatBufferBuilder builder, int numElems)89 public static void startFvecVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } endMonsterExtra(FlatBufferBuilder builder)90 public static int endMonsterExtra(FlatBufferBuilder builder) { 91 int o = builder.endTable(); 92 return o; 93 } finishMonsterExtraBuffer(FlatBufferBuilder builder, int offset)94 public static void finishMonsterExtraBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset, "MONE"); } finishSizePrefixedMonsterExtraBuffer(FlatBufferBuilder builder, int offset)95 public static void finishSizePrefixedMonsterExtraBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset, "MONE"); } 96 97 public static final class Vector extends BaseVector { __assign(int _vector, int _element_size, ByteBuffer _bb)98 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 99 get(int j)100 public MonsterExtra get(int j) { return get(new MonsterExtra(), j); } get(MonsterExtra obj, int j)101 public MonsterExtra get(MonsterExtra obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 102 } 103 } 104 105