Package io.objectbox.flatbuffers
Class ShortVector
- java.lang.Object
-
- io.objectbox.flatbuffers.BaseVector
-
- io.objectbox.flatbuffers.ShortVector
-
public final class ShortVector extends BaseVector
Helper type for accessing vector of signed or unsigned 16-bit values.
-
-
Field Summary
-
Fields inherited from class io.objectbox.flatbuffers.BaseVector
bb
-
-
Constructor Summary
Constructors Constructor Description ShortVector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShortVector
__assign(int _vector, java.nio.ByteBuffer _bb)
Assigns vector access object to vector data.short
get(int j)
Reads the short value at the given index.int
getAsUnsigned(int j)
Reads the short at the given index, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 65535.
-
-
-
Method Detail
-
__assign
public ShortVector __assign(int _vector, java.nio.ByteBuffer _bb)
Assigns vector access object to vector data.- Parameters:
_vector
- Start data of a vector._bb
- Table's ByteBuffer.- Returns:
- Returns current vector access object assigned to vector data whose offset is stored at `vector`.
-
get
public short get(int j)
Reads the short value at the given index.- Parameters:
j
- The index from which the short value will be read.- Returns:
- the 16-bit value at the given index.
-
getAsUnsigned
public int getAsUnsigned(int j)
Reads the short at the given index, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 65535.- Parameters:
j
- The index from which the short value will be read.- Returns:
- the unsigned 16-bit at the given index.
-
-