Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class TokenTransferList.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<TokenTransferList,TokenTransferList.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<TokenTransferList,TokenTransferList.Builder>
com.hedera.hashgraph.sdk.proto.TokenTransferList.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,TokenTransferListOrBuilder,Cloneable
- Enclosing class:
TokenTransferList
public static final class TokenTransferList.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<TokenTransferList,TokenTransferList.Builder>
implements TokenTransferListOrBuilder
* A list of transfers for a particular (non-HBAR) token type. A `TokenTransferList` applies to a single token type, but may contain many individual transfers.<br/> Each transfer of a fungible/common token MUST specify an `accountID` and `amount`. Amount SHALL be positive when the account receives tokens, and SHALL be negative when the account sends tokens. The amount SHOULD NOT be `0`.<br/> In a transfer list containing fungible/common tokens in the `transfers` list, the sum of all such transfers MUST be zero (`0`). Each transfer of a unique token SHALL specify both sender and receiver, as well as the serial number transferred.<br/> A single `TokenTransferList` MUST contain `transfers` or `nftTransfers`, but MUST NOT contain both.Protobuf type
proto.TokenTransferList-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllNftTransfers(Iterable<? extends NftTransfer> values) * A list of NftTransfers.addAllTransfers(Iterable<? extends AccountAmount> values) * A list of account amounts.addNftTransfers(int index, NftTransfer value) * A list of NftTransfers.addNftTransfers(int index, NftTransfer.Builder builderForValue) * A list of NftTransfers.addNftTransfers(NftTransfer value) * A list of NftTransfers.addNftTransfers(NftTransfer.Builder builderForValue) * A list of NftTransfers.addTransfers(int index, AccountAmount value) * A list of account amounts.addTransfers(int index, AccountAmount.Builder builderForValue) * A list of account amounts.addTransfers(AccountAmount value) * A list of account amounts.addTransfers(AccountAmount.Builder builderForValue) * A list of account amounts.* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.* A list of NftTransfers.* A token identifier.<br/> This is the token to be transferred.* A list of account amounts.com.google.protobuf.UInt32Value* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.getNftTransfers(int index) * A list of NftTransfers.int* A list of NftTransfers.* A list of NftTransfers.getToken()* A token identifier.<br/> This is the token to be transferred.getTransfers(int index) * A list of account amounts.int* A list of account amounts.* A list of account amounts.boolean* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.booleanhasToken()* A token identifier.<br/> This is the token to be transferred.mergeExpectedDecimals(com.google.protobuf.UInt32Value value) * An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.mergeToken(TokenID value) * A token identifier.<br/> This is the token to be transferred.removeNftTransfers(int index) * A list of NftTransfers.removeTransfers(int index) * A list of account amounts.setExpectedDecimals(com.google.protobuf.UInt32Value value) * An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.setExpectedDecimals(com.google.protobuf.UInt32Value.Builder builderForValue) * An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.setNftTransfers(int index, NftTransfer value) * A list of NftTransfers.setNftTransfers(int index, NftTransfer.Builder builderForValue) * A list of NftTransfers.* A token identifier.<br/> This is the token to be transferred.setToken(TokenID.Builder builderForValue) * A token identifier.<br/> This is the token to be transferred.setTransfers(int index, AccountAmount value) * A list of account amounts.setTransfers(int index, AccountAmount.Builder builderForValue) * A list of account amounts.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasToken
public boolean hasToken()* A token identifier.<br/> This is the token to be transferred.
.proto.TokenID token = 1;- Specified by:
hasTokenin interfaceTokenTransferListOrBuilder- Returns:
- Whether the token field is set.
-
getToken
* A token identifier.<br/> This is the token to be transferred.
.proto.TokenID token = 1;- Specified by:
getTokenin interfaceTokenTransferListOrBuilder- Returns:
- The token.
-
setToken
* A token identifier.<br/> This is the token to be transferred.
.proto.TokenID token = 1; -
setToken
* A token identifier.<br/> This is the token to be transferred.
.proto.TokenID token = 1; -
mergeToken
* A token identifier.<br/> This is the token to be transferred.
.proto.TokenID token = 1; -
clearToken
* A token identifier.<br/> This is the token to be transferred.
.proto.TokenID token = 1; -
getTransfersList
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2;- Specified by:
getTransfersListin interfaceTokenTransferListOrBuilder
-
getTransfersCount
public int getTransfersCount()* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2;- Specified by:
getTransfersCountin interfaceTokenTransferListOrBuilder
-
getTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2;- Specified by:
getTransfersin interfaceTokenTransferListOrBuilder
-
setTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
setTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
addTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
addTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
addTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
addTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
addAllTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
clearTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
removeTransfers
* A list of account amounts. <p> Each entry SHALL have an account and amount.<br/> These transfers SHALL be "double-entry" style; the credits (positive amount) and debits (negative amount) MUST sum to 0, unless this transfer list is part of a `mint` or `burn` operation.<br/> This SHALL be be set for fungible/common tokens and MUST be empty otherwise.
repeated .proto.AccountAmount transfers = 2; -
getNftTransfersList
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3;- Specified by:
getNftTransfersListin interfaceTokenTransferListOrBuilder
-
getNftTransfersCount
public int getNftTransfersCount()* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3;- Specified by:
getNftTransfersCountin interfaceTokenTransferListOrBuilder
-
getNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3;- Specified by:
getNftTransfersin interfaceTokenTransferListOrBuilder
-
setNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
setNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
addNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
addNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
addNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
addNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
addAllNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
clearNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
removeNftTransfers
* A list of NftTransfers. <p> Each entry SHALL have a sender and receiver account, and the serial number of the unique token to transfer.<br/> This SHALL be be set for non-fungible/unique tokens and SHALL be empty otherwise.
repeated .proto.NftTransfer nftTransfers = 3; -
hasExpectedDecimals
public boolean hasExpectedDecimals()* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have. <p> The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` if this is set and the actual decimals specified for the `Token` differ from this value.<br/> If `nftTransfers` is set, then this value SHOULD NOT be set.
.google.protobuf.UInt32Value expected_decimals = 4;- Specified by:
hasExpectedDecimalsin interfaceTokenTransferListOrBuilder- Returns:
- Whether the expectedDecimals field is set.
-
getExpectedDecimals
public com.google.protobuf.UInt32Value getExpectedDecimals()* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have. <p> The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` if this is set and the actual decimals specified for the `Token` differ from this value.<br/> If `nftTransfers` is set, then this value SHOULD NOT be set.
.google.protobuf.UInt32Value expected_decimals = 4;- Specified by:
getExpectedDecimalsin interfaceTokenTransferListOrBuilder- Returns:
- The expectedDecimals.
-
setExpectedDecimals
* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have. <p> The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` if this is set and the actual decimals specified for the `Token` differ from this value.<br/> If `nftTransfers` is set, then this value SHOULD NOT be set.
.google.protobuf.UInt32Value expected_decimals = 4; -
setExpectedDecimals
public TokenTransferList.Builder setExpectedDecimals(com.google.protobuf.UInt32Value.Builder builderForValue) * An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have. <p> The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` if this is set and the actual decimals specified for the `Token` differ from this value.<br/> If `nftTransfers` is set, then this value SHOULD NOT be set.
.google.protobuf.UInt32Value expected_decimals = 4; -
mergeExpectedDecimals
* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have. <p> The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` if this is set and the actual decimals specified for the `Token` differ from this value.<br/> If `nftTransfers` is set, then this value SHOULD NOT be set.
.google.protobuf.UInt32Value expected_decimals = 4; -
clearExpectedDecimals
* An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have. <p> The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` if this is set and the actual decimals specified for the `Token` differ from this value.<br/> If `nftTransfers` is set, then this value SHOULD NOT be set.
.google.protobuf.UInt32Value expected_decimals = 4;
-