Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | import java.nio.*; |
| 4 | import java.lang.*; |
| 5 | import java.util.*; |
| 6 | import com.google.flatbuffers.*; |
| 7 | |
| 8 | @SuppressWarnings("unused") |
| 9 | public final class BookReader extends Struct { |
| 10 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } |
| 11 | public BookReader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 12 | |
| 13 | public int booksRead() { return bb.getInt(bb_pos + 0); } |
| 14 | public void mutateBooksRead(int books_read) { bb.putInt(bb_pos + 0, books_read); } |
| 15 | |
| 16 | public static int createBookReader(FlatBufferBuilder builder, int booksRead) { |
| 17 | builder.prep(4, 4); |
| 18 | builder.putInt(booksRead); |
| 19 | return builder.offset(); |
| 20 | } |
Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame] | 21 | |
| 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 BookReader get(int j) { return get(new BookReader(), j); } |
| 26 | public BookReader get(BookReader obj, int j) { return obj.__assign(__element(j), bb); } |
| 27 | } |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 28 | public BookReaderT unpack() { |
| 29 | BookReaderT _o = new BookReaderT(); |
| 30 | unpackTo(_o); |
| 31 | return _o; |
| 32 | } |
| 33 | public void unpackTo(BookReaderT _o) { |
| 34 | int _oBooksRead = booksRead(); |
| 35 | _o.setBooksRead(_oBooksRead); |
| 36 | } |
| 37 | public static int pack(FlatBufferBuilder builder, BookReaderT _o) { |
| 38 | if (_o == null) return 0; |
| 39 | return createBookReader( |
| 40 | builder, |
| 41 | _o.getBooksRead()); |
| 42 | } |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 43 | } |
| 44 | |