Class Mosaic

java.lang.Object
org.symbol.sdk.CatbufferType
org.symbol.sdk.symbol.models.Mosaic
All Implemented Interfaces:

Serializer


public final class Mosaic extends CatbufferType
  • Field Details

  • Constructor Details

    • Mosaic

      public Mosaic()
      Creates a new Mosaic.
  • Method Details

    • typeHints

      public Map<String,String> typeHints()
      Mosaic.typeHints

      Returns the type-hint map driving the rule-based descriptor pipeline.

      Overrides:

      typeHints in class CatbufferType

      Returns:

      Field-name → rule-key map.

    • setField

      public void setField(String name, Object value)
      Mosaic.setField

      Sets a named field. Used by the rule-based descriptor pipeline.

      Overrides:

      setField in class CatbufferType

      Parameters:

      name - Field name (descriptor key).

      value - Value to assign.

    • getField

      public Object getField(String name)
      Mosaic.getField

      Reads a named field. Used by the facade-level entity inspection helpers.

      Overrides:

      getField in class CatbufferType

      Parameters:

      name - Field name.

      Returns:

      Field value.

    • getMosaicId

      public MosaicId getMosaicId()
      Mosaic.getMosaicId

      Gets the mosaicId field.

      Returns:

      The mosaicId field.

    • setMosaicId

      public void setMosaicId(MosaicId value)
      Mosaic.setMosaicId

      Sets the mosaicId field.

      Parameters:

      value - New mosaicId value.

    • getAmount

      public Amount getAmount()
      Mosaic.getAmount

      Gets the amount field.

      Returns:

      The amount field.

    • setAmount

      public void setAmount(Amount value)
      Mosaic.setAmount

      Sets the amount field.

      Parameters:

      value - New amount value.

    • size

      public int size()
      Mosaic.size

      Calculates the size of the object.

      Returns:

      Size of this object in bytes.

    • deserialize

      public static Mosaic deserialize(ByteBuffer buffer)
      Mosaic.deserialize

      Deserializes an instance of this object from a byte payload.

      Parameters:

      buffer - Output writer.

      Returns:

      Deserialized object.

      Throws:

      IndexOutOfBoundsException - if the buffer is truncated or a declared length overruns it

      IllegalArgumentException - if a field carries an invalid value (e.g. a reserved field or unknown discriminator)

    • serializeInto

      protected void serializeInto(Writer buffer)
      Mosaic.serializeInto

      Writes this object's fields into the supplied buffer.

      Specified by:

      serializeInto in class CatbufferType

      Parameters:

      buffer - Output writer.

    • toString

      public String toString()
      Mosaic.toString

      Returns a string representation of this object.

      Overrides:

      toString in class Object

      Returns:

      String representation of this object.

    • toJson

      public Map<String,Object> toJson()
      Mosaic.toJson

      Converts this object to a JSON-serializable representation.

      Specified by:

      toJson in class CatbufferType

      Returns:

      JSON-serializable representation of this object.