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 BookReader 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 BookReader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 24 booksRead()25 public int booksRead() { return bb.getInt(bb_pos + 0); } mutateBooksRead(int books_read)26 public void mutateBooksRead(int books_read) { bb.putInt(bb_pos + 0, books_read); } 27 createBookReader(FlatBufferBuilder builder, int booksRead)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 { __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 BookReader get(int j) { return get(new BookReader(), j); } get(BookReader obj, int j)38 public BookReader get(BookReader obj, int j) { return obj.__assign(__element(j), bb); } 39 } unpack()40 public BookReaderT unpack() { 41 BookReaderT _o = new BookReaderT(); 42 unpackTo(_o); 43 return _o; 44 } unpackTo(BookReaderT _o)45 public void unpackTo(BookReaderT _o) { 46 int _oBooksRead = booksRead(); 47 _o.setBooksRead(_oBooksRead); 48 } pack(FlatBufferBuilder builder, BookReaderT _o)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 57