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

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

  public long size() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; }
  public int modificationType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
  public int keySize() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; }
  public int valueSize(int j) { int o = __offset(10); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
  public int valueSizeLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer valueSizeAsByteBuffer() { return __vector_as_bytebuffer(10, 1); }
  public ByteBuffer valueSizeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); }
  public int key(int j) { int o = __offset(12); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
  public int keyLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer keyAsByteBuffer() { return __vector_as_bytebuffer(12, 1); }
  public ByteBuffer keyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); }
  public int value(int j) { int o = __offset(14); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; }
  public int valueLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; }
  public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(14, 1); }
  public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); }

  public static int createMetadataModificationBuffer(FlatBufferBuilder builder,
      long size,
      int modificationType,
      int keySize,
      int valueSizeOffset,
      int keyOffset,
      int valueOffset) {
    builder.startObject(6);
    MetadataModificationBuffer.addValue(builder, valueOffset);
    MetadataModificationBuffer.addKey(builder, keyOffset);
    MetadataModificationBuffer.addValueSize(builder, valueSizeOffset);
    MetadataModificationBuffer.addSize(builder, size);
    MetadataModificationBuffer.addKeySize(builder, keySize);
    MetadataModificationBuffer.addModificationType(builder, modificationType);
    return MetadataModificationBuffer.endMetadataModificationBuffer(builder);
  }

  public static void startMetadataModificationBuffer(FlatBufferBuilder builder) { builder.startObject(6); }
  public static void addSize(FlatBufferBuilder builder, long size) { builder.addInt(0, (int)size, (int)0L); }
  public static void addModificationType(FlatBufferBuilder builder, int modificationType) { builder.addByte(1, (byte)modificationType, (byte)0); }
  public static void addKeySize(FlatBufferBuilder builder, int keySize) { builder.addByte(2, (byte)keySize, (byte)0); }
  public static void addValueSize(FlatBufferBuilder builder, int valueSizeOffset) { builder.addOffset(3, valueSizeOffset, 0); }
  public static int createValueSizeVector(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 startValueSizeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static void addKey(FlatBufferBuilder builder, int keyOffset) { builder.addOffset(4, keyOffset, 0); }
  public static int createKeyVector(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 startKeyVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(5, valueOffset, 0); }
  public static int createValueVector(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 startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
  public static int endMetadataModificationBuffer(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy