Class ImmutableUnsignedClaim

java.lang.Object
org.xrpl.xrpl4j.model.client.channels.ImmutableUnsignedClaim
All Implemented Interfaces:
UnsignedClaim

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

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

  • Method Details

    • channel

      public Hash256 channel()
      The Channel ID of the channel that provides the XRP.
      Specified by:
      channel in interface UnsignedClaim
      Returns:
      A Hash256 containing the Channel ID.
    • amount

      public XrpCurrencyAmount amount()
      The amount of XRP, in drops, that the signature of this claim authorizes.
      Specified by:
      amount in interface UnsignedClaim
      Returns:
      An XrpCurrencyAmount representing the amount of the claim.
    • withChannel

      public final ImmutableUnsignedClaim withChannel(Hash256 value)
      Copy the current immutable object by setting a value for the channel attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for channel
      Returns:
      A modified copy of the this object
    • withAmount

      public final ImmutableUnsignedClaim withAmount(XrpCurrencyAmount value)
      Copy the current immutable object by setting a value for the amount attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for amount
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableUnsignedClaim 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: channel, amount.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableUnsignedClaim copyOf(UnsignedClaim instance)
      Creates an immutable copy of a UnsignedClaim 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 UnsignedClaim instance
    • builder

      public static ImmutableUnsignedClaim.Builder builder()
      Creates a builder for ImmutableUnsignedClaim.
       ImmutableUnsignedClaim.builder()
          .channel(org.xrpl.xrpl4j.model.transactions.Hash256) // required channel
          .amount(org.xrpl.xrpl4j.model.transactions.XrpCurrencyAmount) // required amount
          .build();
       
      Returns:
      A new ImmutableUnsignedClaim builder