All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.proximax.sdk.model.transaction.builder.ModifyAccountPropertyTransactionBuilder Maven / Gradle / Ivy

Go to download

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 --------------------------------------------//

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy