All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.proximax.sdk.gen.buffers.AddExchangeOfferBuffer Maven / Gradle / Ivy

Go to download

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 AddExchangeOfferBuffer extends Table {
  public static AddExchangeOfferBuffer getRootAsAddExchangeOfferBuffer(ByteBuffer _bb) { return getRootAsAddExchangeOfferBuffer(_bb, new AddExchangeOfferBuffer()); }
  public static AddExchangeOfferBuffer getRootAsAddExchangeOfferBuffer(ByteBuffer _bb, AddExchangeOfferBuffer 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 AddExchangeOfferBuffer __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 long duration(int j) { int o = __offset(12); return o != 0 ? (long)bb.getInt(__vector(o) + j * 4) & 0xFFFFFFFFL : 0; }
  public int durationLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer durationAsByteBuffer() { return __vector_as_bytebuffer(12, 4); }
  public ByteBuffer durationInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 4); }

  public static int createAddExchangeOfferBuffer(FlatBufferBuilder builder,
      int mosaicIdOffset,
      int mosaicAmountOffset,
      int costOffset,
      int type,
      int durationOffset) {
    builder.startObject(5);
    AddExchangeOfferBuffer.addDuration(builder, durationOffset);
    AddExchangeOfferBuffer.addCost(builder, costOffset);
    AddExchangeOfferBuffer.addMosaicAmount(builder, mosaicAmountOffset);
    AddExchangeOfferBuffer.addMosaicId(builder, mosaicIdOffset);
    AddExchangeOfferBuffer.addType(builder, type);
    return AddExchangeOfferBuffer.endAddExchangeOfferBuffer(builder);
  }

  public static void startAddExchangeOfferBuffer(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 addDuration(FlatBufferBuilder builder, int durationOffset) { builder.addOffset(4, durationOffset, 0); }
  public static int createDurationVector(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 startDurationVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
  public static int endAddExchangeOfferBuffer(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy