/** * <code>repeated .com.openwallet.core.protos.Transaction transaction = 7;</code> */ public Builder addTransaction( com.openwallet.core.protos.Protos.Transaction.Builder builderForValue) { if (transactionBuilder_ == null) { ensureTransactionIsMutable(); transaction_.add(builderForValue.build()); onChanged(); } else { transactionBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated bytes block_hash = 8;</code> * * <pre> * A list of blocks in which the transaction has been observed (on any chain). Also, a number used to disambiguate * ordering within a block. * </pre> */ public Builder setBlockHash( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureBlockHashIsMutable(); blockHash_.set(index, value); onChanged(); return this; } /**
/** * <code>repeated int32 block_relativity_offsets = 9;</code> */ public Builder addAllBlockRelativityOffsets( java.lang.Iterable<? extends java.lang.Integer> values) { ensureBlockRelativityOffsetsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, blockRelativityOffsets_); onChanged(); return this; } /**
public Builder mergeFrom(com.openwallet.core.protos.Protos.Transaction other) { if (other == com.openwallet.core.protos.Protos.Transaction.getDefaultInstance()) return this; if (other.hasVersion()) { setVersion(other.getVersion()); setTime(other.getTime()); setHash(other.getHash()); setPool(other.getPool()); setLockTime(other.getLockTime()); setUpdatedAt(other.getUpdatedAt()); bitField0_ = (bitField0_ & ~0x00000040); } else { ensureTransactionInputIsMutable(); transactionInput_.addAll(other.transactionInput_); onChanged(); transactionInputBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getTransactionInputFieldBuilder() : null; } else { transactionInputBuilder_.addAllMessages(other.transactionInput_); setNumOfOutputs(other.getNumOfOutputs());
txBuilder.setPool(getProtoPool(wtx)) .setHash(hashToByteString(bitTx.getHash())) .setVersion((int) tx.getVersion()); txBuilder.setTime((int) tx.getTime()); txBuilder.setTokenId(tx.getTokenId()); txBuilder.setExtraBytes(ByteString.copyFrom(tx.getExtraBytes())); txBuilder.setUpdatedAt(tx.getUpdateTime().getTime()); txBuilder.setLockTime((int) tx.getLockTime()); if (input.getValue() != null) inputBuilder.setValue(input.getValue().value); txBuilder.addTransactionInput(inputBuilder); txBuilder.setNumOfOutputs(((TrimmedTransaction) tx).getNumberOfOutputs()); hasAllOutputs = false; txBuilder.addTransactionOutput(outputBuilder); index++; if (appearsInHashes != null) { for (Map.Entry<Sha256Hash, Integer> entry : appearsInHashes.entrySet()) { txBuilder.addBlockHash(hashToByteString(entry.getKey())); txBuilder.addBlockRelativityOffsets(entry.getValue());
/** * <code>repeated bytes block_hash = 8;</code> * * <pre> * A list of blocks in which the transaction has been observed (on any chain). Also, a number used to disambiguate * ordering within a block. * </pre> */ public Builder addBlockHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureBlockHashIsMutable(); blockHash_.add(value); onChanged(); return this; } /**
/** * <code>repeated bytes block_hash = 8;</code> * * <pre> * A list of blocks in which the transaction has been observed (on any chain). Also, a number used to disambiguate * ordering within a block. * </pre> */ public Builder addAllBlockHash( java.lang.Iterable<? extends com.google.protobuf.ByteString> values) { ensureBlockHashIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, blockHash_); onChanged(); return this; } /**
/** * <code>repeated .com.openwallet.core.protos.Transaction transaction = 7;</code> */ public Builder setTransaction( int index, com.openwallet.core.protos.Protos.Transaction.Builder builderForValue) { if (transactionBuilder_ == null) { ensureTransactionIsMutable(); transaction_.set(index, builderForValue.build()); onChanged(); } else { transactionBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .com.openwallet.core.protos.Transaction transaction = 7;</code> */ public Builder addTransaction( int index, com.openwallet.core.protos.Protos.Transaction.Builder builderForValue) { if (transactionBuilder_ == null) { ensureTransactionIsMutable(); transaction_.add(index, builderForValue.build()); onChanged(); } else { transactionBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
private static Builder create() { return new Builder(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
/** * <code>repeated int32 block_relativity_offsets = 9;</code> */ public Builder addBlockRelativityOffsets(int value) { ensureBlockRelativityOffsetsIsMutable(); blockRelativityOffsets_.add(value); onChanged(); return this; } /**
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
/** * <code>repeated int32 block_relativity_offsets = 9;</code> */ public Builder setBlockRelativityOffsets( int index, int value) { ensureBlockRelativityOffsetsIsMutable(); blockRelativityOffsets_.set(index, value); onChanged(); return this; } /**
public com.openwallet.core.protos.Protos.Transaction build() { com.openwallet.core.protos.Protos.Transaction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }