Package io.nem.symbol.catapult.builders
Class NamespaceLifetimeBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.NamespaceLifetimeBuilder
-
- All Implemented Interfaces:
Serializer
public class NamespaceLifetimeBuilder extends java.lang.Object implements Serializer
Binary layout for namespace lifetime
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNamespaceLifetimeBuilder(HeightDto lifetimeStart, HeightDto lifetimeEnd)Constructor.protectedNamespaceLifetimeBuilder(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 NamespaceLifetimeBuildercreate(HeightDto lifetimeStart, HeightDto lifetimeEnd)Creates an instance of NamespaceLifetimeBuilder.HeightDtogetLifetimeEnd()Gets end height.HeightDtogetLifetimeStart()Gets start height.intgetSize()Gets the size of the object.static NamespaceLifetimeBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of NamespaceLifetimeBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Method Detail
-
loadFromBinary
public static NamespaceLifetimeBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of NamespaceLifetimeBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of NamespaceLifetimeBuilder.
-
create
public static NamespaceLifetimeBuilder create(HeightDto lifetimeStart, HeightDto lifetimeEnd)
Creates an instance of NamespaceLifetimeBuilder.- Parameters:
lifetimeStart- Start height.lifetimeEnd- End height.- Returns:
- Instance of NamespaceLifetimeBuilder.
-
getLifetimeStart
public HeightDto getLifetimeStart()
Gets start height.- Returns:
- Start height.
-
getLifetimeEnd
public HeightDto getLifetimeEnd()
Gets end height.- Returns:
- End 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.
-
-