Package org.xrpl.xrpl4j.model.flags
Class OfferCreateFlags
java.lang.Object
org.xrpl.xrpl4j.model.flags.Flags
org.xrpl.xrpl4j.model.flags.TransactionFlags
org.xrpl.xrpl4j.model.flags.OfferCreateFlags
A set of static
TransactionFlags which can be set on OfferCreate transactions.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final OfferCreateFlagsConstantOfferCreateFlagsfor thetfFillOrKillflag.protected static final OfferCreateFlagsConstantOfferCreateFlagsfor thetfHybridflag.protected static final OfferCreateFlagsConstantOfferCreateFlagsfor thetfImmediateOrCancelflag.static final OfferCreateFlagsConstantOfferCreateFlagsfor thetfInnerBatchTxnflag.protected static final OfferCreateFlagsConstantOfferCreateFlagsfor thetfPassiveflag.protected static final OfferCreateFlagsConstantOfferCreateFlagsfor thetfSellflag.Fields inherited from class org.xrpl.xrpl4j.model.flags.TransactionFlags
EMPTY, FULLY_CANONICAL_SIG, UNSET -
Method Summary
Modifier and TypeMethodDescriptionstatic OfferCreateFlags.Builderbuilder()Create a newOfferCreateFlags.Builder.static OfferCreateFlagsempty()Construct an empty instance ofOfferCreateFlags.static OfferCreateFlagsof(long value) ConstructOfferCreateFlagswith a given value.booleanTreat the offer as a Fill or Kill order .booleantfHybrid()Indicates the offer is hybrid.booleanTreat the offer as an Immediate or Cancel order .booleanIndicates that this transaction is an inner transaction of a Batch transaction.booleanIf enabled, the offer does not consume offers that exactly match it, and instead becomes an Offer object in the ledger.booleantfSell()Exchange the entire TakerGets amount, even if it means obtaining more than the TakerPays amount in exchange.Methods inherited from class org.xrpl.xrpl4j.model.flags.TransactionFlags
tfFullyCanonicalSig
-
Field Details
-
PASSIVE
ConstantOfferCreateFlagsfor thetfPassiveflag. -
IMMEDIATE_OR_CANCEL
ConstantOfferCreateFlagsfor thetfImmediateOrCancelflag. -
FILL_OR_KILL
ConstantOfferCreateFlagsfor thetfFillOrKillflag. -
SELL
ConstantOfferCreateFlagsfor thetfSellflag. -
HYBRID
ConstantOfferCreateFlagsfor thetfHybridflag. -
INNER_BATCH_TXN
ConstantOfferCreateFlagsfor thetfInnerBatchTxnflag. This flag is used to indicate that a transaction is an inner transaction of a Batch.- See Also:
-
-
Method Details
-
builder
Create a newOfferCreateFlags.Builder.- Returns:
- A new
OfferCreateFlags.Builder.
-
of
ConstructOfferCreateFlagswith a given value.- Parameters:
value- The long-number encoded flags value of thisOfferCreateFlags.- Returns:
- New
OfferCreateFlags.
-
empty
Construct an empty instance ofOfferCreateFlags. Transactions with empty flags will not be serialized with aFlagsfield.- Returns:
- An empty
OfferCreateFlags.
-
tfPassive
public boolean tfPassive()If enabled, the offer does not consume offers that exactly match it, and instead becomes an Offer object in the ledger. It still consumes offers that cross it.- Returns:
trueiftfPassiveis set, otherwisefalse.
-
tfImmediateOrCancel
public boolean tfImmediateOrCancel()Treat the offer as an Immediate or Cancel order . If enabled, the offer never becomes a ledger object: it only tries to match existing offers in the ledger. If the offer cannot match any offers immediately, it executes "successfully" without trading any currency. In this case, the transaction has the result code tesSUCCESS, but creates no Offer objects in the ledger.- Returns:
trueiftfImmediateOrCancelis set, otherwisefalse.
-
tfFillOrKill
public boolean tfFillOrKill()Treat the offer as a Fill or Kill order . Only try to match existing offers in the ledger, and only do so if the entire TakerPays quantity can be obtained. If the fix1578 amendment is enabled and the offer cannot be executed when placed, the transaction has the result code tecKILLED; otherwise, the transaction uses the result code tesSUCCESS even when it was killed without trading any currency.- Returns:
trueiftfFillOrKillis set, otherwisefalse.
-
tfSell
public boolean tfSell()Exchange the entire TakerGets amount, even if it means obtaining more than the TakerPays amount in exchange.- Returns:
trueiftfSellis set, otherwisefalse.
-
tfHybrid
public boolean tfHybrid()Indicates the offer is hybrid.- Returns:
trueiftfHybridis set, otherwisefalse.
-
tfInnerBatchTxn
public boolean tfInnerBatchTxn()Indicates that this transaction is an inner transaction of a Batch transaction.- Overrides:
tfInnerBatchTxnin classTransactionFlags- Returns:
trueiftfInnerBatchTxnis set, otherwisefalse.- See Also:
-