1
2
3 package com.github.davidmoten.rtree.fbs.generated;
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 Node_ extends Table {
12 public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_8(); }
13 public static Node_ getRootAsNode_(ByteBuffer _bb) { return getRootAsNode_(_bb, new Node_()); }
14 public static Node_ getRootAsNode_(ByteBuffer _bb, Node_ 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 Node_ __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
17
18 public com.github.davidmoten.rtree.fbs.generated.Bounds_ mbb() { return mbb(new com.github.davidmoten.rtree.fbs.generated.Bounds_()); }
19 public com.github.davidmoten.rtree.fbs.generated.Bounds_ mbb(com.github.davidmoten.rtree.fbs.generated.Bounds_ obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
20 public com.github.davidmoten.rtree.fbs.generated.Node_ children(int j) { return children(new com.github.davidmoten.rtree.fbs.generated.Node_(), j); }
21 public com.github.davidmoten.rtree.fbs.generated.Node_ children(com.github.davidmoten.rtree.fbs.generated.Node_ obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
22 public int childrenLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
23 public com.github.davidmoten.rtree.fbs.generated.Node_.Vector childrenVector() { return childrenVector(new com.github.davidmoten.rtree.fbs.generated.Node_.Vector()); }
24 public com.github.davidmoten.rtree.fbs.generated.Node_.Vector childrenVector(com.github.davidmoten.rtree.fbs.generated.Node_.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
25 public com.github.davidmoten.rtree.fbs.generated.Entry_ entries(int j) { return entries(new com.github.davidmoten.rtree.fbs.generated.Entry_(), j); }
26 public com.github.davidmoten.rtree.fbs.generated.Entry_ entries(com.github.davidmoten.rtree.fbs.generated.Entry_ obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
27 public int entriesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; }
28 public com.github.davidmoten.rtree.fbs.generated.Entry_.Vector entriesVector() { return entriesVector(new com.github.davidmoten.rtree.fbs.generated.Entry_.Vector()); }
29 public com.github.davidmoten.rtree.fbs.generated.Entry_.Vector entriesVector(com.github.davidmoten.rtree.fbs.generated.Entry_.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
30
31 public static int createNode_(FlatBufferBuilder builder,
32 int mbbOffset,
33 int childrenOffset,
34 int entriesOffset) {
35 builder.startTable(3);
36 Node_.addEntries(builder, entriesOffset);
37 Node_.addChildren(builder, childrenOffset);
38 Node_.addMbb(builder, mbbOffset);
39 return Node_.endNode_(builder);
40 }
41
42 public static void startNode_(FlatBufferBuilder builder) { builder.startTable(3); }
43 public static void addMbb(FlatBufferBuilder builder, int mbbOffset) { builder.addOffset(0, mbbOffset, 0); }
44 public static void addChildren(FlatBufferBuilder builder, int childrenOffset) { builder.addOffset(1, childrenOffset, 0); }
45 public static int createChildrenVector(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(); }
46 public static void startChildrenVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
47 public static void addEntries(FlatBufferBuilder builder, int entriesOffset) { builder.addOffset(2, entriesOffset, 0); }
48 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(); }
49 public static void startEntriesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
50 public static int endNode_(FlatBufferBuilder builder) {
51 int o = builder.endTable();
52 return o;
53 }
54
55 public static final class Vector extends BaseVector {
56 public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
57
58 public Node_ get(int j) { return get(new Node_(), j); }
59 public Node_ get(Node_ obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
60 }
61 }
62