1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 import com.google.flatbuffers.BaseVector; 4 import com.google.flatbuffers.BooleanVector; 5 import com.google.flatbuffers.ByteVector; 6 import com.google.flatbuffers.Constants; 7 import com.google.flatbuffers.DoubleVector; 8 import com.google.flatbuffers.FlatBufferBuilder; 9 import com.google.flatbuffers.FloatVector; 10 import com.google.flatbuffers.IntVector; 11 import com.google.flatbuffers.LongVector; 12 import com.google.flatbuffers.ShortVector; 13 import com.google.flatbuffers.StringVector; 14 import com.google.flatbuffers.Struct; 15 import com.google.flatbuffers.Table; 16 import com.google.flatbuffers.UnionVector; 17 import java.nio.ByteBuffer; 18 import java.nio.ByteOrder; 19 20 @SuppressWarnings("unused") 21 public final class Rapunzel extends Struct { __init(int _i, ByteBuffer _bb)22 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } __assign(int _i, ByteBuffer _bb)23 public Rapunzel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 24 hairLength()25 public int hairLength() { return bb.getInt(bb_pos + 0); } mutateHairLength(int hair_length)26 public void mutateHairLength(int hair_length) { bb.putInt(bb_pos + 0, hair_length); } 27 createRapunzel(FlatBufferBuilder builder, int hairLength)28 public static int createRapunzel(FlatBufferBuilder builder, int hairLength) { 29 builder.prep(4, 4); 30 builder.putInt(hairLength); 31 return builder.offset(); 32 } 33 34 public static final class Vector extends BaseVector { __assign(int _vector, int _element_size, ByteBuffer _bb)35 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 36 get(int j)37 public Rapunzel get(int j) { return get(new Rapunzel(), j); } get(Rapunzel obj, int j)38 public Rapunzel get(Rapunzel obj, int j) { return obj.__assign(__element(j), bb); } 39 } unpack()40 public RapunzelT unpack() { 41 RapunzelT _o = new RapunzelT(); 42 unpackTo(_o); 43 return _o; 44 } unpackTo(RapunzelT _o)45 public void unpackTo(RapunzelT _o) { 46 int _oHairLength = hairLength(); 47 _o.setHairLength(_oHairLength); 48 } pack(FlatBufferBuilder builder, RapunzelT _o)49 public static int pack(FlatBufferBuilder builder, RapunzelT _o) { 50 if (_o == null) return 0; 51 return createRapunzel( 52 builder, 53 _o.getHairLength()); 54 } 55 } 56 57