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