blob: ad6d9c186c7e2b9ffd5c8031c5adb8abbc1faa81 [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3import java.nio.*;
4import java.lang.*;
5import java.util.*;
6import com.google.flatbuffers.*;
7
8@SuppressWarnings("unused")
9public final class Rapunzel extends Struct {
10 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
11 public Rapunzel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
12
13 public int hairLength() { return bb.getInt(bb_pos + 0); }
14 public void mutateHairLength(int hair_length) { bb.putInt(bb_pos + 0, hair_length); }
15
16 public static int createRapunzel(FlatBufferBuilder builder, int hairLength) {
17 builder.prep(4, 4);
18 builder.putInt(hairLength);
19 return builder.offset();
20 }
Austin Schuh272c6132020-11-14 16:37:52 -080021
22 public static final class Vector extends BaseVector {
23 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
24
25 public Rapunzel get(int j) { return get(new Rapunzel(), j); }
26 public Rapunzel get(Rapunzel obj, int j) { return obj.__assign(__element(j), bb); }
27 }
James Kuszmaul8e62b022022-03-22 09:33:25 -070028 public RapunzelT unpack() {
29 RapunzelT _o = new RapunzelT();
30 unpackTo(_o);
31 return _o;
32 }
33 public void unpackTo(RapunzelT _o) {
34 int _oHairLength = hairLength();
35 _o.setHairLength(_oHairLength);
36 }
37 public static int pack(FlatBufferBuilder builder, RapunzelT _o) {
38 if (_o == null) return 0;
39 return createRapunzel(
40 builder,
41 _o.getHairLength());
42 }
Austin Schuhe89fa2d2019-08-14 20:24:23 -070043}
44