1 // automatically generated by the FlatBuffers compiler, do not modify 2 3 package optional_scalars; 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 ScalarStuff extends Table { ValidateVersion()12 public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } getRootAsScalarStuff(ByteBuffer _bb)13 public static ScalarStuff getRootAsScalarStuff(ByteBuffer _bb) { return getRootAsScalarStuff(_bb, new ScalarStuff()); } getRootAsScalarStuff(ByteBuffer _bb, ScalarStuff obj)14 public static ScalarStuff getRootAsScalarStuff(ByteBuffer _bb, ScalarStuff obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } ScalarStuffBufferHasIdentifier(ByteBuffer _bb)15 public static boolean ScalarStuffBufferHasIdentifier(ByteBuffer _bb) { return __has_identifier(_bb, "NULL"); } __init(int _i, ByteBuffer _bb)16 public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } __assign(int _i, ByteBuffer _bb)17 public ScalarStuff __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } 18 justI8()19 public byte justI8() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } hasMaybeI8()20 public boolean hasMaybeI8() { return 0 != __offset(6); } maybeI8()21 public byte maybeI8() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } defaultI8()22 public byte defaultI8() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 42; } justU8()23 public int justU8() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } hasMaybeU8()24 public boolean hasMaybeU8() { return 0 != __offset(12); } maybeU8()25 public int maybeU8() { int o = __offset(12); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } defaultU8()26 public int defaultU8() { int o = __offset(14); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 42; } justI16()27 public short justI16() { int o = __offset(16); return o != 0 ? bb.getShort(o + bb_pos) : 0; } hasMaybeI16()28 public boolean hasMaybeI16() { return 0 != __offset(18); } maybeI16()29 public short maybeI16() { int o = __offset(18); return o != 0 ? bb.getShort(o + bb_pos) : 0; } defaultI16()30 public short defaultI16() { int o = __offset(20); return o != 0 ? bb.getShort(o + bb_pos) : 42; } justU16()31 public int justU16() { int o = __offset(22); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } hasMaybeU16()32 public boolean hasMaybeU16() { return 0 != __offset(24); } maybeU16()33 public int maybeU16() { int o = __offset(24); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } defaultU16()34 public int defaultU16() { int o = __offset(26); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 42; } justI32()35 public int justI32() { int o = __offset(28); return o != 0 ? bb.getInt(o + bb_pos) : 0; } hasMaybeI32()36 public boolean hasMaybeI32() { return 0 != __offset(30); } maybeI32()37 public int maybeI32() { int o = __offset(30); return o != 0 ? bb.getInt(o + bb_pos) : 0; } defaultI32()38 public int defaultI32() { int o = __offset(32); return o != 0 ? bb.getInt(o + bb_pos) : 42; } justU32()39 public long justU32() { int o = __offset(34); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } hasMaybeU32()40 public boolean hasMaybeU32() { return 0 != __offset(36); } maybeU32()41 public long maybeU32() { int o = __offset(36); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } defaultU32()42 public long defaultU32() { int o = __offset(38); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 42L; } justI64()43 public long justI64() { int o = __offset(40); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } hasMaybeI64()44 public boolean hasMaybeI64() { return 0 != __offset(42); } maybeI64()45 public long maybeI64() { int o = __offset(42); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } defaultI64()46 public long defaultI64() { int o = __offset(44); return o != 0 ? bb.getLong(o + bb_pos) : 42L; } justU64()47 public long justU64() { int o = __offset(46); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } hasMaybeU64()48 public boolean hasMaybeU64() { return 0 != __offset(48); } maybeU64()49 public long maybeU64() { int o = __offset(48); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } defaultU64()50 public long defaultU64() { int o = __offset(50); return o != 0 ? bb.getLong(o + bb_pos) : 42L; } justF32()51 public float justF32() { int o = __offset(52); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } hasMaybeF32()52 public boolean hasMaybeF32() { return 0 != __offset(54); } maybeF32()53 public float maybeF32() { int o = __offset(54); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } defaultF32()54 public float defaultF32() { int o = __offset(56); return o != 0 ? bb.getFloat(o + bb_pos) : 42.0f; } justF64()55 public double justF64() { int o = __offset(58); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; } hasMaybeF64()56 public boolean hasMaybeF64() { return 0 != __offset(60); } maybeF64()57 public double maybeF64() { int o = __offset(60); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; } defaultF64()58 public double defaultF64() { int o = __offset(62); return o != 0 ? bb.getDouble(o + bb_pos) : 42.0; } justBool()59 public boolean justBool() { int o = __offset(64); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } hasMaybeBool()60 public boolean hasMaybeBool() { return 0 != __offset(66); } maybeBool()61 public boolean maybeBool() { int o = __offset(66); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } defaultBool()62 public boolean defaultBool() { int o = __offset(68); return o != 0 ? 0!=bb.get(o + bb_pos) : true; } justEnum()63 public byte justEnum() { int o = __offset(70); return o != 0 ? bb.get(o + bb_pos) : 0; } hasMaybeEnum()64 public boolean hasMaybeEnum() { return 0 != __offset(72); } maybeEnum()65 public byte maybeEnum() { int o = __offset(72); return o != 0 ? bb.get(o + bb_pos) : 0; } defaultEnum()66 public byte defaultEnum() { int o = __offset(74); return o != 0 ? bb.get(o + bb_pos) : 1; } 67 createScalarStuff(FlatBufferBuilder builder, byte just_i8, byte maybe_i8, byte default_i8, int just_u8, int maybe_u8, int default_u8, short just_i16, short maybe_i16, short default_i16, int just_u16, int maybe_u16, int default_u16, int just_i32, int maybe_i32, int default_i32, long just_u32, long maybe_u32, long default_u32, long just_i64, long maybe_i64, long default_i64, long just_u64, long maybe_u64, long default_u64, float just_f32, float maybe_f32, float default_f32, double just_f64, double maybe_f64, double default_f64, boolean just_bool, boolean maybe_bool, boolean default_bool, byte just_enum, byte maybe_enum, byte default_enum)68 public static int createScalarStuff(FlatBufferBuilder builder, 69 byte just_i8, 70 byte maybe_i8, 71 byte default_i8, 72 int just_u8, 73 int maybe_u8, 74 int default_u8, 75 short just_i16, 76 short maybe_i16, 77 short default_i16, 78 int just_u16, 79 int maybe_u16, 80 int default_u16, 81 int just_i32, 82 int maybe_i32, 83 int default_i32, 84 long just_u32, 85 long maybe_u32, 86 long default_u32, 87 long just_i64, 88 long maybe_i64, 89 long default_i64, 90 long just_u64, 91 long maybe_u64, 92 long default_u64, 93 float just_f32, 94 float maybe_f32, 95 float default_f32, 96 double just_f64, 97 double maybe_f64, 98 double default_f64, 99 boolean just_bool, 100 boolean maybe_bool, 101 boolean default_bool, 102 byte just_enum, 103 byte maybe_enum, 104 byte default_enum) { 105 builder.startTable(36); 106 ScalarStuff.addDefaultF64(builder, default_f64); 107 ScalarStuff.addMaybeF64(builder, maybe_f64); 108 ScalarStuff.addJustF64(builder, just_f64); 109 ScalarStuff.addDefaultU64(builder, default_u64); 110 ScalarStuff.addMaybeU64(builder, maybe_u64); 111 ScalarStuff.addJustU64(builder, just_u64); 112 ScalarStuff.addDefaultI64(builder, default_i64); 113 ScalarStuff.addMaybeI64(builder, maybe_i64); 114 ScalarStuff.addJustI64(builder, just_i64); 115 ScalarStuff.addDefaultF32(builder, default_f32); 116 ScalarStuff.addMaybeF32(builder, maybe_f32); 117 ScalarStuff.addJustF32(builder, just_f32); 118 ScalarStuff.addDefaultU32(builder, default_u32); 119 ScalarStuff.addMaybeU32(builder, maybe_u32); 120 ScalarStuff.addJustU32(builder, just_u32); 121 ScalarStuff.addDefaultI32(builder, default_i32); 122 ScalarStuff.addMaybeI32(builder, maybe_i32); 123 ScalarStuff.addJustI32(builder, just_i32); 124 ScalarStuff.addDefaultU16(builder, default_u16); 125 ScalarStuff.addMaybeU16(builder, maybe_u16); 126 ScalarStuff.addJustU16(builder, just_u16); 127 ScalarStuff.addDefaultI16(builder, default_i16); 128 ScalarStuff.addMaybeI16(builder, maybe_i16); 129 ScalarStuff.addJustI16(builder, just_i16); 130 ScalarStuff.addDefaultEnum(builder, default_enum); 131 ScalarStuff.addMaybeEnum(builder, maybe_enum); 132 ScalarStuff.addJustEnum(builder, just_enum); 133 ScalarStuff.addDefaultBool(builder, default_bool); 134 ScalarStuff.addMaybeBool(builder, maybe_bool); 135 ScalarStuff.addJustBool(builder, just_bool); 136 ScalarStuff.addDefaultU8(builder, default_u8); 137 ScalarStuff.addMaybeU8(builder, maybe_u8); 138 ScalarStuff.addJustU8(builder, just_u8); 139 ScalarStuff.addDefaultI8(builder, default_i8); 140 ScalarStuff.addMaybeI8(builder, maybe_i8); 141 ScalarStuff.addJustI8(builder, just_i8); 142 return ScalarStuff.endScalarStuff(builder); 143 } 144 startScalarStuff(FlatBufferBuilder builder)145 public static void startScalarStuff(FlatBufferBuilder builder) { builder.startTable(36); } addJustI8(FlatBufferBuilder builder, byte justI8)146 public static void addJustI8(FlatBufferBuilder builder, byte justI8) { builder.addByte(0, justI8, 0); } addMaybeI8(FlatBufferBuilder builder, byte maybeI8)147 public static void addMaybeI8(FlatBufferBuilder builder, byte maybeI8) { builder.addByte(1, maybeI8, 0); } addDefaultI8(FlatBufferBuilder builder, byte defaultI8)148 public static void addDefaultI8(FlatBufferBuilder builder, byte defaultI8) { builder.addByte(2, defaultI8, 42); } addJustU8(FlatBufferBuilder builder, int justU8)149 public static void addJustU8(FlatBufferBuilder builder, int justU8) { builder.addByte(3, (byte)justU8, (byte)0); } addMaybeU8(FlatBufferBuilder builder, int maybeU8)150 public static void addMaybeU8(FlatBufferBuilder builder, int maybeU8) { builder.addByte(4, (byte)maybeU8, (byte)0); } addDefaultU8(FlatBufferBuilder builder, int defaultU8)151 public static void addDefaultU8(FlatBufferBuilder builder, int defaultU8) { builder.addByte(5, (byte)defaultU8, (byte)42); } addJustI16(FlatBufferBuilder builder, short justI16)152 public static void addJustI16(FlatBufferBuilder builder, short justI16) { builder.addShort(6, justI16, 0); } addMaybeI16(FlatBufferBuilder builder, short maybeI16)153 public static void addMaybeI16(FlatBufferBuilder builder, short maybeI16) { builder.addShort(7, maybeI16, 0); } addDefaultI16(FlatBufferBuilder builder, short defaultI16)154 public static void addDefaultI16(FlatBufferBuilder builder, short defaultI16) { builder.addShort(8, defaultI16, 42); } addJustU16(FlatBufferBuilder builder, int justU16)155 public static void addJustU16(FlatBufferBuilder builder, int justU16) { builder.addShort(9, (short)justU16, (short)0); } addMaybeU16(FlatBufferBuilder builder, int maybeU16)156 public static void addMaybeU16(FlatBufferBuilder builder, int maybeU16) { builder.addShort(10, (short)maybeU16, (short)0); } addDefaultU16(FlatBufferBuilder builder, int defaultU16)157 public static void addDefaultU16(FlatBufferBuilder builder, int defaultU16) { builder.addShort(11, (short)defaultU16, (short)42); } addJustI32(FlatBufferBuilder builder, int justI32)158 public static void addJustI32(FlatBufferBuilder builder, int justI32) { builder.addInt(12, justI32, 0); } addMaybeI32(FlatBufferBuilder builder, int maybeI32)159 public static void addMaybeI32(FlatBufferBuilder builder, int maybeI32) { builder.addInt(13, maybeI32, 0); } addDefaultI32(FlatBufferBuilder builder, int defaultI32)160 public static void addDefaultI32(FlatBufferBuilder builder, int defaultI32) { builder.addInt(14, defaultI32, 42); } addJustU32(FlatBufferBuilder builder, long justU32)161 public static void addJustU32(FlatBufferBuilder builder, long justU32) { builder.addInt(15, (int)justU32, (int)0L); } addMaybeU32(FlatBufferBuilder builder, long maybeU32)162 public static void addMaybeU32(FlatBufferBuilder builder, long maybeU32) { builder.addInt(16, (int)maybeU32, (int)0L); } addDefaultU32(FlatBufferBuilder builder, long defaultU32)163 public static void addDefaultU32(FlatBufferBuilder builder, long defaultU32) { builder.addInt(17, (int)defaultU32, (int)42L); } addJustI64(FlatBufferBuilder builder, long justI64)164 public static void addJustI64(FlatBufferBuilder builder, long justI64) { builder.addLong(18, justI64, 0L); } addMaybeI64(FlatBufferBuilder builder, long maybeI64)165 public static void addMaybeI64(FlatBufferBuilder builder, long maybeI64) { builder.addLong(19, maybeI64, 0L); } addDefaultI64(FlatBufferBuilder builder, long defaultI64)166 public static void addDefaultI64(FlatBufferBuilder builder, long defaultI64) { builder.addLong(20, defaultI64, 42L); } addJustU64(FlatBufferBuilder builder, long justU64)167 public static void addJustU64(FlatBufferBuilder builder, long justU64) { builder.addLong(21, justU64, 0L); } addMaybeU64(FlatBufferBuilder builder, long maybeU64)168 public static void addMaybeU64(FlatBufferBuilder builder, long maybeU64) { builder.addLong(22, maybeU64, 0L); } addDefaultU64(FlatBufferBuilder builder, long defaultU64)169 public static void addDefaultU64(FlatBufferBuilder builder, long defaultU64) { builder.addLong(23, defaultU64, 42L); } addJustF32(FlatBufferBuilder builder, float justF32)170 public static void addJustF32(FlatBufferBuilder builder, float justF32) { builder.addFloat(24, justF32, 0.0f); } addMaybeF32(FlatBufferBuilder builder, float maybeF32)171 public static void addMaybeF32(FlatBufferBuilder builder, float maybeF32) { builder.addFloat(25, maybeF32, 0f); } addDefaultF32(FlatBufferBuilder builder, float defaultF32)172 public static void addDefaultF32(FlatBufferBuilder builder, float defaultF32) { builder.addFloat(26, defaultF32, 42.0f); } addJustF64(FlatBufferBuilder builder, double justF64)173 public static void addJustF64(FlatBufferBuilder builder, double justF64) { builder.addDouble(27, justF64, 0.0); } addMaybeF64(FlatBufferBuilder builder, double maybeF64)174 public static void addMaybeF64(FlatBufferBuilder builder, double maybeF64) { builder.addDouble(28, maybeF64, 0.0); } addDefaultF64(FlatBufferBuilder builder, double defaultF64)175 public static void addDefaultF64(FlatBufferBuilder builder, double defaultF64) { builder.addDouble(29, defaultF64, 42.0); } addJustBool(FlatBufferBuilder builder, boolean justBool)176 public static void addJustBool(FlatBufferBuilder builder, boolean justBool) { builder.addBoolean(30, justBool, false); } addMaybeBool(FlatBufferBuilder builder, boolean maybeBool)177 public static void addMaybeBool(FlatBufferBuilder builder, boolean maybeBool) { builder.addBoolean(31, maybeBool, false); } addDefaultBool(FlatBufferBuilder builder, boolean defaultBool)178 public static void addDefaultBool(FlatBufferBuilder builder, boolean defaultBool) { builder.addBoolean(32, defaultBool, true); } addJustEnum(FlatBufferBuilder builder, byte justEnum)179 public static void addJustEnum(FlatBufferBuilder builder, byte justEnum) { builder.addByte(33, justEnum, 0); } addMaybeEnum(FlatBufferBuilder builder, byte maybeEnum)180 public static void addMaybeEnum(FlatBufferBuilder builder, byte maybeEnum) { builder.addByte(34, maybeEnum, 0); } addDefaultEnum(FlatBufferBuilder builder, byte defaultEnum)181 public static void addDefaultEnum(FlatBufferBuilder builder, byte defaultEnum) { builder.addByte(35, defaultEnum, 1); } endScalarStuff(FlatBufferBuilder builder)182 public static int endScalarStuff(FlatBufferBuilder builder) { 183 int o = builder.endTable(); 184 return o; 185 } finishScalarStuffBuffer(FlatBufferBuilder builder, int offset)186 public static void finishScalarStuffBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset, "NULL"); } finishSizePrefixedScalarStuffBuffer(FlatBufferBuilder builder, int offset)187 public static void finishSizePrefixedScalarStuffBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset, "NULL"); } 188 189 public static final class Vector extends BaseVector { __assign(int _vector, int _element_size, ByteBuffer _bb)190 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } 191 get(int j)192 public ScalarStuff get(int j) { return get(new ScalarStuff(), j); } get(ScalarStuff obj, int j)193 public ScalarStuff get(ScalarStuff obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } 194 } 195 } 196 197