blob: 58d34f3dc8475cf54ced4f2131592679b4e88a2a [file] [log] [blame]
Austin Schuhe89fa2d2019-08-14 20:24:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2
3package MyGame.Example;
4
5import java.nio.*;
6import java.lang.*;
7import java.util.*;
8import com.google.flatbuffers.*;
9
10@SuppressWarnings("unused")
11public final class Stat extends Table {
12 public static void ValidateVersion() { Constants.FLATBUFFERS_1_11_1(); }
13 public static Stat getRootAsStat(ByteBuffer _bb) { return getRootAsStat(_bb, new Stat()); }
14 public static Stat getRootAsStat(ByteBuffer _bb, Stat 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 Stat __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
17
18 public String id() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
19 public ByteBuffer idAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
20 public ByteBuffer idInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }
21 public long val() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
22 public boolean mutateVal(long val) { int o = __offset(6); if (o != 0) { bb.putLong(o + bb_pos, val); return true; } else { return false; } }
23 public int count() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; }
24 public boolean mutateCount(int count) { int o = __offset(8); if (o != 0) { bb.putShort(o + bb_pos, (short)count); return true; } else { return false; } }
25
26 public static int createStat(FlatBufferBuilder builder,
27 int idOffset,
28 long val,
29 int count) {
30 builder.startTable(3);
31 Stat.addVal(builder, val);
32 Stat.addId(builder, idOffset);
33 Stat.addCount(builder, count);
34 return Stat.endStat(builder);
35 }
36
37 public static void startStat(FlatBufferBuilder builder) { builder.startTable(3); }
38 public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); }
39 public static void addVal(FlatBufferBuilder builder, long val) { builder.addLong(1, val, 0L); }
40 public static void addCount(FlatBufferBuilder builder, int count) { builder.addShort(2, (short)count, (short)0); }
41 public static int endStat(FlatBufferBuilder builder) {
42 int o = builder.endTable();
43 return o;
44 }
45}
46