Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | |
| 3 | package DictionaryLookup; |
| 4 | |
| 5 | import java.nio.*; |
| 6 | import java.lang.*; |
| 7 | import java.util.*; |
| 8 | import com.google.flatbuffers.*; |
| 9 | |
| 10 | @SuppressWarnings("unused") |
| 11 | public final class LongFloatMap extends Table { |
James Kuszmaul | 3b15b0c | 2022-11-08 14:03:16 -0800 | [diff] [blame^] | 12 | public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } |
Austin Schuh | 2dd86a9 | 2022-09-14 21:19:23 -0700 | [diff] [blame] | 13 | public static LongFloatMap getRootAsLongFloatMap(ByteBuffer _bb) { return getRootAsLongFloatMap(_bb, new LongFloatMap()); } |
| 14 | public static LongFloatMap getRootAsLongFloatMap(ByteBuffer _bb, LongFloatMap obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } |
| 15 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } |
| 16 | public LongFloatMap __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } |
| 17 | |
| 18 | public DictionaryLookup.LongFloatEntry entries(int j) { return entries(new DictionaryLookup.LongFloatEntry(), j); } |
| 19 | public DictionaryLookup.LongFloatEntry entries(DictionaryLookup.LongFloatEntry obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } |
| 20 | public int entriesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } |
| 21 | public DictionaryLookup.LongFloatEntry entriesByKey(long key) { int o = __offset(4); return o != 0 ? DictionaryLookup.LongFloatEntry.__lookup_by_key(null, __vector(o), key, bb) : null; } |
| 22 | public DictionaryLookup.LongFloatEntry entriesByKey(DictionaryLookup.LongFloatEntry obj, long key) { int o = __offset(4); return o != 0 ? DictionaryLookup.LongFloatEntry.__lookup_by_key(obj, __vector(o), key, bb) : null; } |
| 23 | public DictionaryLookup.LongFloatEntry.Vector entriesVector() { return entriesVector(new DictionaryLookup.LongFloatEntry.Vector()); } |
| 24 | public DictionaryLookup.LongFloatEntry.Vector entriesVector(DictionaryLookup.LongFloatEntry.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } |
| 25 | |
| 26 | public static int createLongFloatMap(FlatBufferBuilder builder, |
| 27 | int entriesOffset) { |
| 28 | builder.startTable(1); |
| 29 | LongFloatMap.addEntries(builder, entriesOffset); |
| 30 | return LongFloatMap.endLongFloatMap(builder); |
| 31 | } |
| 32 | |
| 33 | public static void startLongFloatMap(FlatBufferBuilder builder) { builder.startTable(1); } |
| 34 | public static void addEntries(FlatBufferBuilder builder, int entriesOffset) { builder.addOffset(0, entriesOffset, 0); } |
| 35 | public static int createEntriesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } |
| 36 | public static void startEntriesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } |
| 37 | public static int endLongFloatMap(FlatBufferBuilder builder) { |
| 38 | int o = builder.endTable(); |
| 39 | return o; |
| 40 | } |
| 41 | public static void finishLongFloatMapBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } |
| 42 | public static void finishSizePrefixedLongFloatMapBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } |
| 43 | |
| 44 | public static final class Vector extends BaseVector { |
| 45 | public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } |
| 46 | |
| 47 | public LongFloatMap get(int j) { return get(new LongFloatMap(), j); } |
| 48 | public LongFloatMap get(LongFloatMap obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } |
| 49 | } |
| 50 | } |
| 51 | |