Package io.nem.symbol.catapult.builders
Class AccountRestrictionsBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.AccountRestrictionsBuilder
-
- All Implemented Interfaces:
Serializer
public class AccountRestrictionsBuilder extends java.lang.Object implements Serializer
Binary layout for account restrictions
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAccountRestrictionsBuilder(AddressDto address, java.util.List<AccountRestrictionsInfoBuilder> restrictions)Constructor.protectedAccountRestrictionsBuilder(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 AccountRestrictionsBuildercreate(AddressDto address, java.util.List<AccountRestrictionsInfoBuilder> restrictions)Creates an instance of AccountRestrictionsBuilder.AddressDtogetAddress()Gets address on which restrictions are placed.java.util.List<AccountRestrictionsInfoBuilder>getRestrictions()Gets account restrictions.intgetSize()Gets the size of the object.static AccountRestrictionsBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of AccountRestrictionsBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Constructor Detail
-
AccountRestrictionsBuilder
protected AccountRestrictionsBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
AccountRestrictionsBuilder
protected AccountRestrictionsBuilder(AddressDto address, java.util.List<AccountRestrictionsInfoBuilder> restrictions)
Constructor.- Parameters:
address- Address on which restrictions are placed.restrictions- Account restrictions.
-
-
Method Detail
-
loadFromBinary
public static AccountRestrictionsBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of AccountRestrictionsBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of AccountRestrictionsBuilder.
-
create
public static AccountRestrictionsBuilder create(AddressDto address, java.util.List<AccountRestrictionsInfoBuilder> restrictions)
Creates an instance of AccountRestrictionsBuilder.- Parameters:
address- Address on which restrictions are placed.restrictions- Account restrictions.- Returns:
- Instance of AccountRestrictionsBuilder.
-
getAddress
public AddressDto getAddress()
Gets address on which restrictions are placed.- Returns:
- Address on which restrictions are placed.
-
getRestrictions
public java.util.List<AccountRestrictionsInfoBuilder> getRestrictions()
Gets account restrictions.- Returns:
- Account restrictions.
-
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.
-
-