// automatically generated by the FlatBuffers compiler, do not modify

package AllWatchSerialize;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class TextData extends Table {
  public static TextData getRootAsTextData(ByteBuffer _bb) { return getRootAsTextData(_bb, new TextData()); }
  public static TextData getRootAsTextData(ByteBuffer _bb, TextData obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
  public TextData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public String major() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
  public ByteBuffer majorAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
  public ByteBuffer majorInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }
  public String minor() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; }
  public ByteBuffer minorAsByteBuffer() { return __vector_as_bytebuffer(6, 1); }
  public ByteBuffer minorInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); }
  public Component additionalComponents(int j) { return additionalComponents(new Component(), j); }
  public Component additionalComponents(Component obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
  public int additionalComponentsLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; }

  public static int createTextData(FlatBufferBuilder builder,
      int majorOffset,
      int minorOffset,
      int additionalComponentsOffset) {
    builder.startObject(3);
    TextData.addAdditionalComponents(builder, additionalComponentsOffset);
    TextData.addMinor(builder, minorOffset);
    TextData.addMajor(builder, majorOffset);
    return TextData.endTextData(builder);
  }

  public static void startTextData(FlatBufferBuilder builder) { builder.startObject(3); }
  public static void addMajor(FlatBufferBuilder builder, int majorOffset) { builder.addOffset(0, majorOffset, 0); }
  public static void addMinor(FlatBufferBuilder builder, int minorOffset) { builder.addOffset(1, minorOffset, 0); }
  public static void addAdditionalComponents(FlatBufferBuilder builder, int additionalComponentsOffset) { builder.addOffset(2, additionalComponentsOffset, 0); }
  public static int createAdditionalComponentsVector(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(); }
  public static void startAdditionalComponentsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
  public static int endTextData(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}

