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

io.proximax.sdk.gen.buffers.MosaicBuffer 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 MosaicBuffer extends Table {
  public static MosaicBuffer getRootAsMosaicBuffer(ByteBuffer _bb) { return getRootAsMosaicBuffer(_bb, new MosaicBuffer()); }
  public static MosaicBuffer getRootAsMosaicBuffer(ByteBuffer _bb, MosaicBuffer 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 MosaicBuffer __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public long id(int j) { int o = __offset(4); return o != 0 ? (long)bb.getInt(__vector(o) + j * 4) & 0xFFFFFFFFL : 0; }
  public int idLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer idAsByteBuffer() { return __vector_as_bytebuffer(4, 4); }
  public ByteBuffer idInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 4); }
  public long amount(int j) { int o = __offset(6); return o != 0 ? (long)bb.getInt(__vector(o) + j * 4) & 0xFFFFFFFFL : 0; }
  public int amountLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer amountAsByteBuffer() { return __vector_as_bytebuffer(6, 4); }
  public ByteBuffer amountInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 4); }

  public static int createMosaicBuffer(FlatBufferBuilder builder,
      int idOffset,
      int amountOffset) {
    builder.startObject(2);
    MosaicBuffer.addAmount(builder, amountOffset);
    MosaicBuffer.addId(builder, idOffset);
    return MosaicBuffer.endMosaicBuffer(builder);
  }

  public static void startMosaicBuffer(FlatBufferBuilder builder) { builder.startObject(2); }
  public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); }
  public static int createIdVector(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 startIdVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
  public static void addAmount(FlatBufferBuilder builder, int amountOffset) { builder.addOffset(1, amountOffset, 0); }
  public static int createAmountVector(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 startAmountVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
  public static int endMosaicBuffer(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy