io.proximax.sdk.gen.buffers.ExchangeOfferBuffer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-xpx-chain-sdk Show documentation
Show all versions of java-xpx-chain-sdk Show documentation
The ProximaX Sirius Chain Java SDK is a Java library for interacting with the Sirius Blockchain.
The newest version!
// automatically generated by the FlatBuffers compiler, do not modify
package io.proximax.sdk.gen.buffers;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
public final class ExchangeOfferBuffer extends Table {
public static ExchangeOfferBuffer getRootAsExchangeOfferBuffer(ByteBuffer _bb) { return getRootAsExchangeOfferBuffer(_bb, new ExchangeOfferBuffer()); }
public static ExchangeOfferBuffer getRootAsExchangeOfferBuffer(ByteBuffer _bb, ExchangeOfferBuffer 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; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); }
public ExchangeOfferBuffer __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public long mosaicId(int j) { int o = __offset(4); return o != 0 ? (long)bb.getInt(__vector(o) + j * 4) & 0xFFFFFFFFL : 0; }
public int mosaicIdLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer mosaicIdAsByteBuffer() { return __vector_as_bytebuffer(4, 4); }
public ByteBuffer mosaicIdInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 4); }
public long mosaicAmount(int j) { int o = __offset(6); return o != 0 ? (long)bb.getInt(__vector(o) + j * 4) & 0xFFFFFFFFL : 0; }
public int mosaicAmountLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer mosaicAmountAsByteBuffer() { return __vector_as_bytebuffer(6, 4); }
public ByteBuffer mosaicAmountInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 4); }
public long cost(int j) { int o = __offset(8); return o != 0 ? (long)bb.getInt(__vector(o) + j * 4) & 0xFFFFFFFFL : 0; }
public int costLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer costAsByteBuffer() { return __vector_as_bytebuffer(8, 4); }
public ByteBuffer costInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 4); }
public int type() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
public int owner(int j) { int o = __offset(12); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
public int ownerLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; }
public ByteBuffer ownerAsByteBuffer() { return __vector_as_bytebuffer(12, 1); }
public ByteBuffer ownerInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); }
public static int createExchangeOfferBuffer(FlatBufferBuilder builder,
int mosaicIdOffset,
int mosaicAmountOffset,
int costOffset,
int type,
int ownerOffset) {
builder.startObject(5);
ExchangeOfferBuffer.addOwner(builder, ownerOffset);
ExchangeOfferBuffer.addCost(builder, costOffset);
ExchangeOfferBuffer.addMosaicAmount(builder, mosaicAmountOffset);
ExchangeOfferBuffer.addMosaicId(builder, mosaicIdOffset);
ExchangeOfferBuffer.addType(builder, type);
return ExchangeOfferBuffer.endExchangeOfferBuffer(builder);
}
public static void startExchangeOfferBuffer(FlatBufferBuilder builder) { builder.startObject(5); }
public static void addMosaicId(FlatBufferBuilder builder, int mosaicIdOffset) { builder.addOffset(0, mosaicIdOffset, 0); }
public static int createMosaicIdVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); }
public static void startMosaicIdVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static void addMosaicAmount(FlatBufferBuilder builder, int mosaicAmountOffset) { builder.addOffset(1, mosaicAmountOffset, 0); }
public static int createMosaicAmountVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); }
public static void startMosaicAmountVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static void addCost(FlatBufferBuilder builder, int costOffset) { builder.addOffset(2, costOffset, 0); }
public static int createCostVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); }
public static void startCostVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static void addType(FlatBufferBuilder builder, int type) { builder.addByte(3, (byte)type, (byte)0); }
public static void addOwner(FlatBufferBuilder builder, int ownerOffset) { builder.addOffset(4, ownerOffset, 0); }
public static int createOwnerVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); }
public static void startOwnerVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static int endExchangeOfferBuffer(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}