...

Text file src/github.com/google/flatbuffers/goldens/java/Galaxy.java

Documentation: github.com/google/flatbuffers/goldens/java

     1// automatically generated by the FlatBuffers compiler, do not modify
     2
     3import com.google.flatbuffers.BaseVector;
     4import com.google.flatbuffers.BooleanVector;
     5import com.google.flatbuffers.ByteVector;
     6import com.google.flatbuffers.Constants;
     7import com.google.flatbuffers.DoubleVector;
     8import com.google.flatbuffers.FlatBufferBuilder;
     9import com.google.flatbuffers.FloatVector;
    10import com.google.flatbuffers.IntVector;
    11import com.google.flatbuffers.LongVector;
    12import com.google.flatbuffers.ShortVector;
    13import com.google.flatbuffers.StringVector;
    14import com.google.flatbuffers.Struct;
    15import com.google.flatbuffers.Table;
    16import com.google.flatbuffers.UnionVector;
    17import java.nio.ByteBuffer;
    18import java.nio.ByteOrder;
    19
    20@SuppressWarnings("unused")
    21public final class Galaxy extends Table {
    22  public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); }
    23  public static Galaxy getRootAsGalaxy(ByteBuffer _bb) { return getRootAsGalaxy(_bb, new Galaxy()); }
    24  public static Galaxy getRootAsGalaxy(ByteBuffer _bb, Galaxy obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
    25  public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
    26  public Galaxy __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
    27
    28  public long numStars() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }
    29
    30  public static int createGalaxy(FlatBufferBuilder builder,
    31      long numStars) {
    32    builder.startTable(1);
    33    Galaxy.addNumStars(builder, numStars);
    34    return Galaxy.endGalaxy(builder);
    35  }
    36
    37  public static void startGalaxy(FlatBufferBuilder builder) { builder.startTable(1); }
    38  public static void addNumStars(FlatBufferBuilder builder, long numStars) { builder.addLong(0, numStars, 0L); }
    39  public static int endGalaxy(FlatBufferBuilder builder) {
    40    int o = builder.endTable();
    41    return o;
    42  }
    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 Galaxy get(int j) { return get(new Galaxy(), j); }
    48    public Galaxy get(Galaxy obj, int j) {  return obj.__assign(__indirect(__element(j), bb), bb); }
    49  }
    50}
    51

View as plain text