io.proximax.sdk.model.transaction.builder.ModifyAccountPropertyTransactionBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-xpx-chain-sdk Show documentation
Show all versions of java-xpx-chain-sdk Show documentation
The ProximaX Sirius Chain Java SDK is a Java library for interacting with the Sirius Blockchain.
The newest version!
/*
* Copyright 2019 ProximaX Limited. All rights reserved.
* Use of this source code is governed by the Apache 2.0
* license that can be found in the LICENSE file.
*/
package io.proximax.sdk.model.transaction.builder;
import java.util.ArrayList;
import java.util.List;
import io.proximax.sdk.model.account.props.AccountPropertyModification;
import io.proximax.sdk.model.account.props.AccountPropertyType;
import io.proximax.sdk.model.transaction.EntityType;
import io.proximax.sdk.model.transaction.ModifyAccountPropertyTransaction;
/**
* base class for builders of {@link ModifyAccountPropertyTransaction}
*/
public abstract class ModifyAccountPropertyTransactionBuilder extends TransactionBuilder, ModifyAccountPropertyTransaction> {
private AccountPropertyType propertyType;
private List> modifications;
public ModifyAccountPropertyTransactionBuilder(EntityType type, Integer version) {
super(type, version);
// provide empty lists as defaults
this.modifications = new ArrayList<>();
}
@Override
protected ModifyAccountPropertyTransactionBuilder self() {
return this;
}
// ------------------------------------- setters ---------------------------------------------//
/**
* @param propertyType the propertyType to set
* @return self
*/
public ModifyAccountPropertyTransactionBuilder propertyType(AccountPropertyType propertyType) {
this.propertyType = propertyType;
return self();
}
/**
* @param modifications the modifications to set
* @return self
*/
public ModifyAccountPropertyTransactionBuilder modifications(List> modifications) {
this.modifications = modifications;
return self();
}
// ------------------------------------- getters ---------------------------------------------//
/**
* @return the propertyType
*/
public AccountPropertyType getPropertyType() {
return propertyType;
}
/**
* @return the modifications
*/
public List> getModifications() {
return modifications;
}
// -------------------------------------- convenience --------------------------------------------//
}