/** * <code>repeated .com.openwallet.core.protos.WalletPocket pockets = 6;</code> */ public Builder setPockets( int index, com.openwallet.core.protos.Protos.WalletPocket.Builder builderForValue) { if (pocketsBuilder_ == null) { ensurePocketsIsMutable(); pockets_.set(index, builderForValue.build()); onChanged(); } else { pocketsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .com.openwallet.core.protos.WalletPocket pockets = 6;</code> */ public Builder addPockets( com.openwallet.core.protos.Protos.WalletPocket.Builder builderForValue) { if (pocketsBuilder_ == null) { ensurePocketsIsMutable(); pockets_.add(builderForValue.build()); onChanged(); } else { pocketsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .com.openwallet.core.protos.WalletPocket pockets = 6;</code> */ public Builder addPockets( int index, com.openwallet.core.protos.Protos.WalletPocket.Builder builderForValue) { if (pocketsBuilder_ == null) { ensurePocketsIsMutable(); pockets_.add(index, builderForValue.build()); onChanged(); } else { pocketsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
return walletBuilder.build();
public static Protos.WalletPocket toProtobuf(NxtFamilyWallet account) { Protos.WalletPocket.Builder walletBuilder = Protos.WalletPocket.newBuilder(); walletBuilder.setNetworkIdentifier(account.getCoinType().getId()); if (account.getDescription() != null) { walletBuilder.setDescription(account.getDescription()); } if (account.getId() != null) { walletBuilder.setId(account.getId()); } // for (WalletTransaction wtx : account.getWalletTransactions()) { // Protos.Transaction txProto = makeTxProto(wtx); // walletBuilder.addTransaction(txProto); // } walletBuilder.addAllKey(account.serializeKeychainToProtobuf()); // Populate the lastSeenBlockHash field. // if (account.getLastBlockSeenHash() != null) { // walletBuilder.setLastSeenBlockHash(hashToByteString(account.getLastBlockSeenHash())); // walletBuilder.setLastSeenBlockHeight(account.getLastBlockSeenHeight()); // } // if (account.getLastBlockSeenTimeSecs() > 0) { // walletBuilder.setLastSeenBlockTimeSecs(account.getLastBlockSeenTimeSecs()); // } return walletBuilder.build(); }