1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 package MyGame.Example; 4 5 import com.google.flatbuffers.BaseVector; 6 import com.google.flatbuffers.BooleanVector; 7 import com.google.flatbuffers.ByteVector; 8 import com.google.flatbuffers.Constants; 9 import com.google.flatbuffers.DoubleVector; 10 import com.google.flatbuffers.FlatBufferBuilder; 11 import com.google.flatbuffers.FloatVector; 12 import com.google.flatbuffers.IntVector; 13 import com.google.flatbuffers.LongVector; 14 import com.google.flatbuffers.ShortVector; 15 import com.google.flatbuffers.StringVector; 16 import com.google.flatbuffers.Struct; 17 import com.google.flatbuffers.Table; 18 import com.google.flatbuffers.UnionVector; 19 import java.nio.ByteBuffer; 20 import java.nio.ByteOrder; 21 22 public class MonsterT { 23 private MyGame.Example.Vec3T pos; 24 private short mana; 25 private short hp; 26 private String name; 27 private int[] inventory; 28 private int color; 29 private MyGame.Example.AnyUnion test; 30 private MyGame.Example.TestT[] test4; 31 private String[] testarrayofstring; 32 private MyGame.Example.MonsterT[] testarrayoftables; 33 private MyGame.Example.MonsterT enemy; 34 private int[] testnestedflatbuffer; 35 private MyGame.Example.StatT testempty; 36 private boolean testbool; 37 private int testhashs32Fnv1; 38 private long testhashu32Fnv1; 39 private long testhashs64Fnv1; 40 private long testhashu64Fnv1; 41 private int testhashs32Fnv1a; 42 private long testhashu32Fnv1a; 43 private long testhashs64Fnv1a; 44 private long testhashu64Fnv1a; 45 private boolean[] testarrayofbools; 46 private float testf; 47 private float testf2; 48 private float testf3; 49 private String[] testarrayofstring2; 50 private MyGame.Example.AbilityT[] testarrayofsortedstruct; 51 private int[] flex; 52 private MyGame.Example.TestT[] test5; 53 private long[] vectorOfLongs; 54 private double[] vectorOfDoubles; 55 private MyGame.InParentNamespaceT parentNamespaceTest; 56 private MyGame.Example.ReferrableT[] vectorOfReferrables; 57 private long singleWeakReference; 58 private long[] vectorOfWeakReferences; 59 private MyGame.Example.ReferrableT[] vectorOfStrongReferrables; 60 private long coOwningReference; 61 private long[] vectorOfCoOwningReferences; 62 private long nonOwningReference; 63 private long[] vectorOfNonOwningReferences; 64 private MyGame.Example.AnyUniqueAliasesUnion anyUnique; 65 private MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous; 66 private int[] vectorOfEnums; 67 private byte signedEnum; 68 private int[] testrequirednestedflatbuffer; 69 private MyGame.Example.StatT[] scalarKeySortedTables; 70 private MyGame.Example.TestT nativeInline; 71 private long longEnumNonEnumDefault; 72 private long longEnumNormalDefault; 73 private float nanDefault; 74 private float infDefault; 75 private float positiveInfDefault; 76 private float infinityDefault; 77 private float positiveInfinityDefault; 78 private float negativeInfDefault; 79 private float negativeInfinityDefault; 80 private double doubleInfDefault; 81 getPos()82 public MyGame.Example.Vec3T getPos() { return pos; } 83 setPos(MyGame.Example.Vec3T pos)84 public void setPos(MyGame.Example.Vec3T pos) { this.pos = pos; } 85 getMana()86 public short getMana() { return mana; } 87 setMana(short mana)88 public void setMana(short mana) { this.mana = mana; } 89 getHp()90 public short getHp() { return hp; } 91 setHp(short hp)92 public void setHp(short hp) { this.hp = hp; } 93 getName()94 public String getName() { return name; } 95 setName(String name)96 public void setName(String name) { this.name = name; } 97 getInventory()98 public int[] getInventory() { return inventory; } 99 setInventory(int[] inventory)100 public void setInventory(int[] inventory) { this.inventory = inventory; } 101 getColor()102 public int getColor() { return color; } 103 setColor(int color)104 public void setColor(int color) { this.color = color; } 105 getTest()106 public MyGame.Example.AnyUnion getTest() { return test; } 107 setTest(MyGame.Example.AnyUnion test)108 public void setTest(MyGame.Example.AnyUnion test) { this.test = test; } 109 getTest4()110 public MyGame.Example.TestT[] getTest4() { return test4; } 111 setTest4(MyGame.Example.TestT[] test4)112 public void setTest4(MyGame.Example.TestT[] test4) { this.test4 = test4; } 113 getTestarrayofstring()114 public String[] getTestarrayofstring() { return testarrayofstring; } 115 setTestarrayofstring(String[] testarrayofstring)116 public void setTestarrayofstring(String[] testarrayofstring) { this.testarrayofstring = testarrayofstring; } 117 getTestarrayoftables()118 public MyGame.Example.MonsterT[] getTestarrayoftables() { return testarrayoftables; } 119 setTestarrayoftables(MyGame.Example.MonsterT[] testarrayoftables)120 public void setTestarrayoftables(MyGame.Example.MonsterT[] testarrayoftables) { this.testarrayoftables = testarrayoftables; } 121 getEnemy()122 public MyGame.Example.MonsterT getEnemy() { return enemy; } 123 setEnemy(MyGame.Example.MonsterT enemy)124 public void setEnemy(MyGame.Example.MonsterT enemy) { this.enemy = enemy; } 125 getTestnestedflatbuffer()126 public int[] getTestnestedflatbuffer() { return testnestedflatbuffer; } 127 setTestnestedflatbuffer(int[] testnestedflatbuffer)128 public void setTestnestedflatbuffer(int[] testnestedflatbuffer) { this.testnestedflatbuffer = testnestedflatbuffer; } 129 getTestempty()130 public MyGame.Example.StatT getTestempty() { return testempty; } 131 setTestempty(MyGame.Example.StatT testempty)132 public void setTestempty(MyGame.Example.StatT testempty) { this.testempty = testempty; } 133 getTestbool()134 public boolean getTestbool() { return testbool; } 135 setTestbool(boolean testbool)136 public void setTestbool(boolean testbool) { this.testbool = testbool; } 137 getTesthashs32Fnv1()138 public int getTesthashs32Fnv1() { return testhashs32Fnv1; } 139 setTesthashs32Fnv1(int testhashs32Fnv1)140 public void setTesthashs32Fnv1(int testhashs32Fnv1) { this.testhashs32Fnv1 = testhashs32Fnv1; } 141 getTesthashu32Fnv1()142 public long getTesthashu32Fnv1() { return testhashu32Fnv1; } 143 setTesthashu32Fnv1(long testhashu32Fnv1)144 public void setTesthashu32Fnv1(long testhashu32Fnv1) { this.testhashu32Fnv1 = testhashu32Fnv1; } 145 getTesthashs64Fnv1()146 public long getTesthashs64Fnv1() { return testhashs64Fnv1; } 147 setTesthashs64Fnv1(long testhashs64Fnv1)148 public void setTesthashs64Fnv1(long testhashs64Fnv1) { this.testhashs64Fnv1 = testhashs64Fnv1; } 149 getTesthashu64Fnv1()150 public long getTesthashu64Fnv1() { return testhashu64Fnv1; } 151 setTesthashu64Fnv1(long testhashu64Fnv1)152 public void setTesthashu64Fnv1(long testhashu64Fnv1) { this.testhashu64Fnv1 = testhashu64Fnv1; } 153 getTesthashs32Fnv1a()154 public int getTesthashs32Fnv1a() { return testhashs32Fnv1a; } 155 setTesthashs32Fnv1a(int testhashs32Fnv1a)156 public void setTesthashs32Fnv1a(int testhashs32Fnv1a) { this.testhashs32Fnv1a = testhashs32Fnv1a; } 157 getTesthashu32Fnv1a()158 public long getTesthashu32Fnv1a() { return testhashu32Fnv1a; } 159 setTesthashu32Fnv1a(long testhashu32Fnv1a)160 public void setTesthashu32Fnv1a(long testhashu32Fnv1a) { this.testhashu32Fnv1a = testhashu32Fnv1a; } 161 getTesthashs64Fnv1a()162 public long getTesthashs64Fnv1a() { return testhashs64Fnv1a; } 163 setTesthashs64Fnv1a(long testhashs64Fnv1a)164 public void setTesthashs64Fnv1a(long testhashs64Fnv1a) { this.testhashs64Fnv1a = testhashs64Fnv1a; } 165 getTesthashu64Fnv1a()166 public long getTesthashu64Fnv1a() { return testhashu64Fnv1a; } 167 setTesthashu64Fnv1a(long testhashu64Fnv1a)168 public void setTesthashu64Fnv1a(long testhashu64Fnv1a) { this.testhashu64Fnv1a = testhashu64Fnv1a; } 169 getTestarrayofbools()170 public boolean[] getTestarrayofbools() { return testarrayofbools; } 171 setTestarrayofbools(boolean[] testarrayofbools)172 public void setTestarrayofbools(boolean[] testarrayofbools) { this.testarrayofbools = testarrayofbools; } 173 getTestf()174 public float getTestf() { return testf; } 175 setTestf(float testf)176 public void setTestf(float testf) { this.testf = testf; } 177 getTestf2()178 public float getTestf2() { return testf2; } 179 setTestf2(float testf2)180 public void setTestf2(float testf2) { this.testf2 = testf2; } 181 getTestf3()182 public float getTestf3() { return testf3; } 183 setTestf3(float testf3)184 public void setTestf3(float testf3) { this.testf3 = testf3; } 185 getTestarrayofstring2()186 public String[] getTestarrayofstring2() { return testarrayofstring2; } 187 setTestarrayofstring2(String[] testarrayofstring2)188 public void setTestarrayofstring2(String[] testarrayofstring2) { this.testarrayofstring2 = testarrayofstring2; } 189 getTestarrayofsortedstruct()190 public MyGame.Example.AbilityT[] getTestarrayofsortedstruct() { return testarrayofsortedstruct; } 191 setTestarrayofsortedstruct(MyGame.Example.AbilityT[] testarrayofsortedstruct)192 public void setTestarrayofsortedstruct(MyGame.Example.AbilityT[] testarrayofsortedstruct) { this.testarrayofsortedstruct = testarrayofsortedstruct; } 193 getFlex()194 public int[] getFlex() { return flex; } 195 setFlex(int[] flex)196 public void setFlex(int[] flex) { this.flex = flex; } 197 getTest5()198 public MyGame.Example.TestT[] getTest5() { return test5; } 199 setTest5(MyGame.Example.TestT[] test5)200 public void setTest5(MyGame.Example.TestT[] test5) { this.test5 = test5; } 201 getVectorOfLongs()202 public long[] getVectorOfLongs() { return vectorOfLongs; } 203 setVectorOfLongs(long[] vectorOfLongs)204 public void setVectorOfLongs(long[] vectorOfLongs) { this.vectorOfLongs = vectorOfLongs; } 205 getVectorOfDoubles()206 public double[] getVectorOfDoubles() { return vectorOfDoubles; } 207 setVectorOfDoubles(double[] vectorOfDoubles)208 public void setVectorOfDoubles(double[] vectorOfDoubles) { this.vectorOfDoubles = vectorOfDoubles; } 209 getParentNamespaceTest()210 public MyGame.InParentNamespaceT getParentNamespaceTest() { return parentNamespaceTest; } 211 setParentNamespaceTest(MyGame.InParentNamespaceT parentNamespaceTest)212 public void setParentNamespaceTest(MyGame.InParentNamespaceT parentNamespaceTest) { this.parentNamespaceTest = parentNamespaceTest; } 213 getVectorOfReferrables()214 public MyGame.Example.ReferrableT[] getVectorOfReferrables() { return vectorOfReferrables; } 215 setVectorOfReferrables(MyGame.Example.ReferrableT[] vectorOfReferrables)216 public void setVectorOfReferrables(MyGame.Example.ReferrableT[] vectorOfReferrables) { this.vectorOfReferrables = vectorOfReferrables; } 217 getSingleWeakReference()218 public long getSingleWeakReference() { return singleWeakReference; } 219 setSingleWeakReference(long singleWeakReference)220 public void setSingleWeakReference(long singleWeakReference) { this.singleWeakReference = singleWeakReference; } 221 getVectorOfWeakReferences()222 public long[] getVectorOfWeakReferences() { return vectorOfWeakReferences; } 223 setVectorOfWeakReferences(long[] vectorOfWeakReferences)224 public void setVectorOfWeakReferences(long[] vectorOfWeakReferences) { this.vectorOfWeakReferences = vectorOfWeakReferences; } 225 getVectorOfStrongReferrables()226 public MyGame.Example.ReferrableT[] getVectorOfStrongReferrables() { return vectorOfStrongReferrables; } 227 setVectorOfStrongReferrables(MyGame.Example.ReferrableT[] vectorOfStrongReferrables)228 public void setVectorOfStrongReferrables(MyGame.Example.ReferrableT[] vectorOfStrongReferrables) { this.vectorOfStrongReferrables = vectorOfStrongReferrables; } 229 getCoOwningReference()230 public long getCoOwningReference() { return coOwningReference; } 231 setCoOwningReference(long coOwningReference)232 public void setCoOwningReference(long coOwningReference) { this.coOwningReference = coOwningReference; } 233 getVectorOfCoOwningReferences()234 public long[] getVectorOfCoOwningReferences() { return vectorOfCoOwningReferences; } 235 setVectorOfCoOwningReferences(long[] vectorOfCoOwningReferences)236 public void setVectorOfCoOwningReferences(long[] vectorOfCoOwningReferences) { this.vectorOfCoOwningReferences = vectorOfCoOwningReferences; } 237 getNonOwningReference()238 public long getNonOwningReference() { return nonOwningReference; } 239 setNonOwningReference(long nonOwningReference)240 public void setNonOwningReference(long nonOwningReference) { this.nonOwningReference = nonOwningReference; } 241 getVectorOfNonOwningReferences()242 public long[] getVectorOfNonOwningReferences() { return vectorOfNonOwningReferences; } 243 setVectorOfNonOwningReferences(long[] vectorOfNonOwningReferences)244 public void setVectorOfNonOwningReferences(long[] vectorOfNonOwningReferences) { this.vectorOfNonOwningReferences = vectorOfNonOwningReferences; } 245 getAnyUnique()246 public MyGame.Example.AnyUniqueAliasesUnion getAnyUnique() { return anyUnique; } 247 setAnyUnique(MyGame.Example.AnyUniqueAliasesUnion anyUnique)248 public void setAnyUnique(MyGame.Example.AnyUniqueAliasesUnion anyUnique) { this.anyUnique = anyUnique; } 249 getAnyAmbiguous()250 public MyGame.Example.AnyAmbiguousAliasesUnion getAnyAmbiguous() { return anyAmbiguous; } 251 setAnyAmbiguous(MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous)252 public void setAnyAmbiguous(MyGame.Example.AnyAmbiguousAliasesUnion anyAmbiguous) { this.anyAmbiguous = anyAmbiguous; } 253 getVectorOfEnums()254 public int[] getVectorOfEnums() { return vectorOfEnums; } 255 setVectorOfEnums(int[] vectorOfEnums)256 public void setVectorOfEnums(int[] vectorOfEnums) { this.vectorOfEnums = vectorOfEnums; } 257 getSignedEnum()258 public byte getSignedEnum() { return signedEnum; } 259 setSignedEnum(byte signedEnum)260 public void setSignedEnum(byte signedEnum) { this.signedEnum = signedEnum; } 261 getTestrequirednestedflatbuffer()262 public int[] getTestrequirednestedflatbuffer() { return testrequirednestedflatbuffer; } 263 setTestrequirednestedflatbuffer(int[] testrequirednestedflatbuffer)264 public void setTestrequirednestedflatbuffer(int[] testrequirednestedflatbuffer) { this.testrequirednestedflatbuffer = testrequirednestedflatbuffer; } 265 getScalarKeySortedTables()266 public MyGame.Example.StatT[] getScalarKeySortedTables() { return scalarKeySortedTables; } 267 setScalarKeySortedTables(MyGame.Example.StatT[] scalarKeySortedTables)268 public void setScalarKeySortedTables(MyGame.Example.StatT[] scalarKeySortedTables) { this.scalarKeySortedTables = scalarKeySortedTables; } 269 getNativeInline()270 public MyGame.Example.TestT getNativeInline() { return nativeInline; } 271 setNativeInline(MyGame.Example.TestT nativeInline)272 public void setNativeInline(MyGame.Example.TestT nativeInline) { this.nativeInline = nativeInline; } 273 getLongEnumNonEnumDefault()274 public long getLongEnumNonEnumDefault() { return longEnumNonEnumDefault; } 275 setLongEnumNonEnumDefault(long longEnumNonEnumDefault)276 public void setLongEnumNonEnumDefault(long longEnumNonEnumDefault) { this.longEnumNonEnumDefault = longEnumNonEnumDefault; } 277 getLongEnumNormalDefault()278 public long getLongEnumNormalDefault() { return longEnumNormalDefault; } 279 setLongEnumNormalDefault(long longEnumNormalDefault)280 public void setLongEnumNormalDefault(long longEnumNormalDefault) { this.longEnumNormalDefault = longEnumNormalDefault; } 281 getNanDefault()282 public float getNanDefault() { return nanDefault; } 283 setNanDefault(float nanDefault)284 public void setNanDefault(float nanDefault) { this.nanDefault = nanDefault; } 285 getInfDefault()286 public float getInfDefault() { return infDefault; } 287 setInfDefault(float infDefault)288 public void setInfDefault(float infDefault) { this.infDefault = infDefault; } 289 getPositiveInfDefault()290 public float getPositiveInfDefault() { return positiveInfDefault; } 291 setPositiveInfDefault(float positiveInfDefault)292 public void setPositiveInfDefault(float positiveInfDefault) { this.positiveInfDefault = positiveInfDefault; } 293 getInfinityDefault()294 public float getInfinityDefault() { return infinityDefault; } 295 setInfinityDefault(float infinityDefault)296 public void setInfinityDefault(float infinityDefault) { this.infinityDefault = infinityDefault; } 297 getPositiveInfinityDefault()298 public float getPositiveInfinityDefault() { return positiveInfinityDefault; } 299 setPositiveInfinityDefault(float positiveInfinityDefault)300 public void setPositiveInfinityDefault(float positiveInfinityDefault) { this.positiveInfinityDefault = positiveInfinityDefault; } 301 getNegativeInfDefault()302 public float getNegativeInfDefault() { return negativeInfDefault; } 303 setNegativeInfDefault(float negativeInfDefault)304 public void setNegativeInfDefault(float negativeInfDefault) { this.negativeInfDefault = negativeInfDefault; } 305 getNegativeInfinityDefault()306 public float getNegativeInfinityDefault() { return negativeInfinityDefault; } 307 setNegativeInfinityDefault(float negativeInfinityDefault)308 public void setNegativeInfinityDefault(float negativeInfinityDefault) { this.negativeInfinityDefault = negativeInfinityDefault; } 309 getDoubleInfDefault()310 public double getDoubleInfDefault() { return doubleInfDefault; } 311 setDoubleInfDefault(double doubleInfDefault)312 public void setDoubleInfDefault(double doubleInfDefault) { this.doubleInfDefault = doubleInfDefault; } 313 314 MonsterT()315 public MonsterT() { 316 this.pos = new MyGame.Example.Vec3T(); 317 this.mana = 150; 318 this.hp = 100; 319 this.name = null; 320 this.inventory = null; 321 this.color = 8; 322 this.test = null; 323 this.test4 = null; 324 this.testarrayofstring = null; 325 this.testarrayoftables = null; 326 this.enemy = null; 327 this.testnestedflatbuffer = null; 328 this.testempty = null; 329 this.testbool = false; 330 this.testhashs32Fnv1 = 0; 331 this.testhashu32Fnv1 = 0L; 332 this.testhashs64Fnv1 = 0L; 333 this.testhashu64Fnv1 = 0L; 334 this.testhashs32Fnv1a = 0; 335 this.testhashu32Fnv1a = 0L; 336 this.testhashs64Fnv1a = 0L; 337 this.testhashu64Fnv1a = 0L; 338 this.testarrayofbools = null; 339 this.testf = 3.14159f; 340 this.testf2 = 3.0f; 341 this.testf3 = 0.0f; 342 this.testarrayofstring2 = null; 343 this.testarrayofsortedstruct = null; 344 this.flex = null; 345 this.test5 = null; 346 this.vectorOfLongs = null; 347 this.vectorOfDoubles = null; 348 this.parentNamespaceTest = null; 349 this.vectorOfReferrables = null; 350 this.singleWeakReference = 0L; 351 this.vectorOfWeakReferences = null; 352 this.vectorOfStrongReferrables = null; 353 this.coOwningReference = 0L; 354 this.vectorOfCoOwningReferences = null; 355 this.nonOwningReference = 0L; 356 this.vectorOfNonOwningReferences = null; 357 this.anyUnique = null; 358 this.anyAmbiguous = null; 359 this.vectorOfEnums = null; 360 this.signedEnum = -1; 361 this.testrequirednestedflatbuffer = null; 362 this.scalarKeySortedTables = null; 363 this.nativeInline = new MyGame.Example.TestT(); 364 this.longEnumNonEnumDefault = 0L; 365 this.longEnumNormalDefault = 2L; 366 this.nanDefault = Float.NaN; 367 this.infDefault = Float.POSITIVE_INFINITY; 368 this.positiveInfDefault = Float.POSITIVE_INFINITY; 369 this.infinityDefault = Float.POSITIVE_INFINITY; 370 this.positiveInfinityDefault = Float.POSITIVE_INFINITY; 371 this.negativeInfDefault = Float.NEGATIVE_INFINITY; 372 this.negativeInfinityDefault = Float.NEGATIVE_INFINITY; 373 this.doubleInfDefault = Double.POSITIVE_INFINITY; 374 } deserializeFromBinary(byte[] fbBuffer)375 public static MonsterT deserializeFromBinary(byte[] fbBuffer) { 376 return Monster.getRootAsMonster(ByteBuffer.wrap(fbBuffer)).unpack(); 377 } serializeToBinary()378 public byte[] serializeToBinary() { 379 FlatBufferBuilder fbb = new FlatBufferBuilder(); 380 Monster.finishMonsterBuffer(fbb, Monster.pack(fbb, this)); 381 return fbb.sizedByteArray(); 382 } 383 } 384 385