Class Flags

java.lang.Object
org.xrpl.xrpl4j.model.flags.Flags
Direct Known Subclasses:
AccountRootFlags, CredentialFlags, MpTokenFlags, MpTokenIssuanceFlags, NfTokenFlags, NfTokenOfferFlags, OfferFlags, RippleStateFlags, SignerListFlags, TransactionFlags

public class Flags extends Object
A wrapper around a long value containing various XRPL Transaction Flags.
See Also:
  • "https://xrpl.org/transaction-common-fields.html#flags-field"
  • Field Details

    • UNSET

      public static final Flags UNSET
      Constant for an unset flag.
  • Method Details

    • of

      public static Flags of(long value)
      Construct Flags for the given value.
      Parameters:
      value - A long flags value.
      Returns:
      A new Flags.
    • of

      public static Flags of(Flags flag, Flags... others)
      Construct Flags from one or more Flags by performing a bitwise OR on all.
      Parameters:
      flag - The first Flags.
      others - Zero or more other Flags to include.
      Returns:
      A new Flags.
    • getValue

      public long getValue()
      Get the underlying value of this Flags.
      Returns:
      The underlying long value of this Flags.
    • isEmpty

      public boolean isEmpty()
      Returns whether these TransactionFlags are empty.
      Returns:
      true if these flags are empty, otherwise false.
    • isSet

      public boolean isSet(Flags flag)
      Determines if a specific transaction flag is set by performing a bitwise AND on this Flags and the Flags in question, and checking if the result of that operation is equal to the given flag.
      Parameters:
      flag - The Flags that this method determines is set or not.
      Returns:
      true if the flag is set, false if not.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object