Package io.nem.symbol.catapult.builders
Class ImportanceSnapshotBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.ImportanceSnapshotBuilder
-
- All Implemented Interfaces:
Serializer
public class ImportanceSnapshotBuilder extends java.lang.Object implements Serializer
Temporal importance information
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedImportanceSnapshotBuilder(ImportanceDto importance, ImportanceHeightDto height)Constructor.protectedImportanceSnapshotBuilder(java.io.DataInputStream stream)Constructor - Creates an object from stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImportanceSnapshotBuildercreate(ImportanceDto importance, ImportanceHeightDto height)Creates an instance of ImportanceSnapshotBuilder.ImportanceHeightDtogetHeight()Gets importance height.ImportanceDtogetImportance()Gets account importance.intgetSize()Gets the size of the object.static ImportanceSnapshotBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of ImportanceSnapshotBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Constructor Detail
-
ImportanceSnapshotBuilder
protected ImportanceSnapshotBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
ImportanceSnapshotBuilder
protected ImportanceSnapshotBuilder(ImportanceDto importance, ImportanceHeightDto height)
Constructor.- Parameters:
importance- Account importance.height- Importance height.
-
-
Method Detail
-
loadFromBinary
public static ImportanceSnapshotBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of ImportanceSnapshotBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of ImportanceSnapshotBuilder.
-
create
public static ImportanceSnapshotBuilder create(ImportanceDto importance, ImportanceHeightDto height)
Creates an instance of ImportanceSnapshotBuilder.- Parameters:
importance- Account importance.height- Importance height.- Returns:
- Instance of ImportanceSnapshotBuilder.
-
getImportance
public ImportanceDto getImportance()
Gets account importance.- Returns:
- Account importance.
-
getHeight
public ImportanceHeightDto getHeight()
Gets importance height.- Returns:
- Importance height.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Returns:
- Size in bytes.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Returns:
- Serialized bytes.
-
-