mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Java: Added access object for vector of struct and vector of tables. (#5233)
* Java: Added access object for vector of struct and vector of tables. * Java: Workarounds removed when accessing the union vector.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
97f3aa9174
commit
e365c502ff
@@ -53,5 +53,12 @@ public final class ArrayStruct extends Struct {
|
||||
builder.putFloat(a);
|
||||
return builder.offset();
|
||||
}
|
||||
|
||||
public static final class Vector extends BaseVector {
|
||||
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
|
||||
|
||||
public ArrayStruct get(int j) { return get(new ArrayStruct(), j); }
|
||||
public ArrayStruct get(ArrayStruct obj, int j) { return obj.__assign(__element(j), bb); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user