Class Mosaic
- All Implemented Interfaces:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Mosaicdeserialize(ByteBuffer buffer) Deserializes an instance of this object from a byte payload.Gets the amount field.Reads a named field.Gets the mosaicId field.protected voidserializeInto(Writer buffer) Writes this object's fields into the supplied buffer.voidSets the amount field.voidSets a named field.voidsetMosaicId(MosaicId value) Sets the mosaicId field.intsize()Calculates the size of the object.toJson()Converts this object to a JSON-serializable representation.toString()Returns a string representation of this object.Returns the type-hint map driving the rule-based descriptor pipeline.Methods inherited from class org.symbol.sdk.CatbufferType
asByteArray, asBytes, asInt, asList, asLong, serialize, sort, toJsonString
-
Field Details
-
TYPE_HINTS
-
-
Constructor Details
-
Mosaic
public Mosaic()Creates a new Mosaic.
-
-
Method Details
-
typeHints
- Mosaic.typeHints
Returns the type-hint map driving the rule-based descriptor pipeline.
- Overrides:
typeHintsin classCatbufferType- Returns:
Field-name → rule-key map.
-
setField
- Mosaic.setField
Sets a named field. Used by the rule-based descriptor pipeline.
- Overrides:
setFieldin classCatbufferType- Parameters:
name- Field name (descriptor key).value- Value to assign.
-
getField
- Mosaic.getField
Reads a named field. Used by the facade-level entity inspection helpers.
- Overrides:
getFieldin classCatbufferType- Parameters:
name- Field name.- Returns:
Field value.
-
getMosaicId
- Mosaic.getMosaicId
Gets the mosaicId field.
- Returns:
The mosaicId field.
-
setMosaicId
- Mosaic.setMosaicId
Sets the mosaicId field.
- Parameters:
value- New mosaicId value.
-
getAmount
- Mosaic.getAmount
Gets the amount field.
- Returns:
The amount field.
-
setAmount
- 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
- 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 itIllegalArgumentException- if a field carries an invalid value (e.g. a reserved field or unknown discriminator)
-
serializeInto
- Mosaic.serializeInto
Writes this object's fields into the supplied buffer.
- Specified by:
serializeIntoin classCatbufferType- Parameters:
buffer- Output writer.
-
toString
- Mosaic.toString
Returns a string representation of this object.
-
toJson
- Mosaic.toJson
Converts this object to a JSON-serializable representation.
- Specified by:
toJsonin classCatbufferType- Returns:
JSON-serializable representation of this object.
-