Class ImmutableAuctionSlot

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableAuctionSlot
All Implemented Interfaces:
AuctionSlot

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAuctionSlot extends Object implements AuctionSlot
Immutable implementation of AuctionSlot.

Use the builder to create immutable instances: ImmutableAuctionSlot.builder().

  • Method Details

    • account

      public Address account()
      The current owner of this auction slot.
      Specified by:
      account in interface AuctionSlot
      Returns:
      An Address.
    • authAccounts

      public com.google.common.collect.ImmutableList<AuthAccountWrapper> authAccounts()
      A list of at most 4 additional accounts that are authorized to trade at the discounted fee for this AMM instance.
      Specified by:
      authAccounts in interface AuctionSlot
      Returns:
      A List of AuthAccountWrappers.
    • authAccountsAddresses

      public List<Address> authAccountsAddresses()
      Extracts all the addresses found in the AuthAccounts found in authAccounts().
      Specified by:
      authAccountsAddresses in interface AuctionSlot
      Returns:
      A List of Address.
    • discountedFee

      public TradingFee discountedFee()
      The trading fee to be charged to the auction owner. By default this is 0, meaning that the auction owner can trade at no fee instead of the standard fee for this AMM.
      Specified by:
      discountedFee in interface AuctionSlot
      Returns:
      A TradingFee.
    • price

      public IssuedCurrencyAmount price()
      The amount the auction owner paid to win this slot, in LP Tokens.
      Specified by:
      price in interface AuctionSlot
      Returns:
      An IssuedCurrencyAmount.
    • expiration

      public com.google.common.primitives.UnsignedInteger expiration()
      The time when this slot expires, in seconds since the Ripple Epoch.
      Specified by:
      expiration in interface AuctionSlot
      Returns:
      An UnsignedInteger
    • withAccount

      public final ImmutableAuctionSlot withAccount(Address value)
      Copy the current immutable object by setting a value for the account attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for account
      Returns:
      A modified copy of the this object
    • withAuthAccounts

      public final ImmutableAuctionSlot withAuthAccounts(AuthAccountWrapper... elements)
      Copy the current immutable object with elements that replace the content of authAccounts.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAuthAccounts

      public final ImmutableAuctionSlot withAuthAccounts(Iterable<? extends AuthAccountWrapper> elements)
      Copy the current immutable object with elements that replace the content of authAccounts. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of authAccounts elements to set
      Returns:
      A modified copy of this object
    • withDiscountedFee

      public final ImmutableAuctionSlot withDiscountedFee(TradingFee value)
      Copy the current immutable object by setting a value for the discountedFee attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for discountedFee
      Returns:
      A modified copy of the this object
    • withPrice

      public final ImmutableAuctionSlot withPrice(IssuedCurrencyAmount value)
      Copy the current immutable object by setting a value for the price attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for price
      Returns:
      A modified copy of the this object
    • withExpiration

      public final ImmutableAuctionSlot withExpiration(com.google.common.primitives.UnsignedInteger value)
      Copy the current immutable object by setting a value for the expiration attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for expiration
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAuctionSlot that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: account, authAccounts, authAccountsAddresses, discountedFee, price, expiration.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AuctionSlot with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableAuctionSlot copyOf(AuctionSlot instance)
      Creates an immutable copy of a AuctionSlot value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable AuctionSlot instance
    • builder

      public static ImmutableAuctionSlot.Builder builder()
      Creates a builder for ImmutableAuctionSlot.
       ImmutableAuctionSlot.builder()
          .account(org.xrpl.xrpl4j.model.transactions.Address) // required account
          .addAuthAccounts|addAllAuthAccounts(org.xrpl.xrpl4j.model.ledger.AuthAccountWrapper) // authAccounts elements
          .discountedFee(org.xrpl.xrpl4j.model.transactions.TradingFee) // required discountedFee
          .price(org.xrpl.xrpl4j.model.transactions.IssuedCurrencyAmount) // required price
          .expiration(com.google.common.primitives.UnsignedInteger) // required expiration
          .build();
       
      Returns:
      A new ImmutableAuctionSlot builder