public class BeneficiaryRouteType extends Object implements ByteTransformable, Validatable
| Constructor and Description |
|---|
BeneficiaryRouteType(AccountName account,
short weight)
Create a new beneficiary route type.
|
| Modifier and Type | Method and Description |
|---|---|
AccountName |
getAccount()
Get the account who is the beneficiary of this comment.
|
short |
getWeight()
Get the percentage the
account will receive from
the comment payout. |
void |
setAccount(AccountName account)
Define the beneficiary for this comment.
|
void |
setWeight(short weight)
Set the percentage the
account will receive from
the comment payout. |
byte[] |
toByteArray()
Covert the operation into a byte array.
|
String |
toString() |
void |
validate(ValidationType validationType)
Use this method to verify that this object is valid.
|
public BeneficiaryRouteType(AccountName account, short weight)
account - The account who is the beneficiary of this comment (see
setAccount(AccountName)).weight - The percentage the account will receive from the
comment payout (see setWeight(short)).InvalidParameterException - If a parameter does not fulfill the requirements.public AccountName getAccount()
public void setAccount(AccountName account)
account - The beneficiary account.InvalidParameterException - If the account is null.public short getWeight()
account will receive from
the comment payout.public void setWeight(short weight)
account will receive from
the comment payout.weight - The percentage of the payout to relay.InvalidParameterException - If the weight is negative.public byte[] toByteArray()
throws BeowulfInvalidTransactionException
ByteTransformabletoByteArray in interface ByteTransformableBeowulfInvalidTransactionException - If there was a problem while transforming the transaction
into a byte array.public void validate(ValidationType validationType)
Validatablevalidate in interface ValidatablevalidationType - An indicator telling the method what should be validated.Copyright © 2019. All rights reserved.