Class ImmutableAccountCurrenciesResult

    • Method Detail

      • status

        public Optional<String> status()
        The value "success" indicates the request was successfully received and understood by the server.
        Specified by:
        status in interface XrplResult
        Returns:
        The String "success" if the request was successful, otherwise Optional.empty().
      • ledgerIndex

        @Deprecated
        @Nullable
        public LedgerIndex ledgerIndex()
        Deprecated.
        When requesting Account Channels from a non-validated ledger, the result will not contain this field. To prevent this class from throwing an error when requesting Account Currencies from a non-validated ledger, this field is currently marked as Nullable. However, this field will be Optional in a future release.
        The Ledger Index of the ledger version used to generate this response.
        Specified by:
        ledgerIndex in interface AccountCurrenciesResult
        Returns:
        A LedgerIndex.
      • ledgerCurrentIndex

        public Optional<LedgerIndex> ledgerCurrentIndex()
        The ledger index of the current open ledger, which was used when retrieving this information. Only present in responses to requests with ledger_index = "current".
        Specified by:
        ledgerCurrentIndex in interface AccountCurrenciesResult
        Returns:
        An optionally-present LedgerIndex representing the current ledger index.
      • validated

        public boolean validated()
        If true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change.
        Specified by:
        validated in interface AccountCurrenciesResult
        Returns:
        true if the information in this response comes from a validated ledger version, false if not.
      • receiveCurrencies

        public com.google.common.collect.ImmutableList<String> receiveCurrencies()
        Array of currency codes for currencies that this account can receive.
        Specified by:
        receiveCurrencies in interface AccountCurrenciesResult
        Returns:
        Array of currencies that this account can receive.
      • sendCurrencies

        public com.google.common.collect.ImmutableList<String> sendCurrencies()
        Array of currency codes for currencies that this account can send.
        Specified by:
        sendCurrencies in interface AccountCurrenciesResult
        Returns:
        Array of currencies that this account can send.
      • withStatus

        public final ImmutableAccountCurrenciesResult withStatus​(String value)
        Copy the current immutable object by setting a present value for the optional status attribute.
        Parameters:
        value - The value for status
        Returns:
        A modified copy of this object
      • withStatus

        public final ImmutableAccountCurrenciesResult withStatus​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the status attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for status
        Returns:
        A modified copy of this object
      • withLedgerHash

        public final ImmutableAccountCurrenciesResult withLedgerHash​(Hash256 value)
        Copy the current immutable object by setting a present value for the optional ledgerHash attribute.
        Parameters:
        value - The value for ledgerHash
        Returns:
        A modified copy of this object
      • withLedgerHash

        public final ImmutableAccountCurrenciesResult withLedgerHash​(Optional<? extends Hash256> optional)
        Copy the current immutable object by setting an optional value for the ledgerHash attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for ledgerHash
        Returns:
        A modified copy of this object
      • withLedgerIndex

        @Deprecated
        public final ImmutableAccountCurrenciesResult withLedgerIndex​(@Nullable
                                                                      LedgerIndex value)
        Deprecated.
        Copy the current immutable object by setting a value for the ledgerIndex attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for ledgerIndex (can be null)
        Returns:
        A modified copy of the this object
      • withLedgerCurrentIndex

        public final ImmutableAccountCurrenciesResult withLedgerCurrentIndex​(LedgerIndex value)
        Copy the current immutable object by setting a present value for the optional ledgerCurrentIndex attribute.
        Parameters:
        value - The value for ledgerCurrentIndex
        Returns:
        A modified copy of this object
      • withLedgerCurrentIndex

        public final ImmutableAccountCurrenciesResult withLedgerCurrentIndex​(Optional<? extends LedgerIndex> optional)
        Copy the current immutable object by setting an optional value for the ledgerCurrentIndex attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for ledgerCurrentIndex
        Returns:
        A modified copy of this object
      • withValidated

        public final ImmutableAccountCurrenciesResult withValidated​(boolean value)
        Copy the current immutable object by setting a value for the validated attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for validated
        Returns:
        A modified copy of the this object
      • withReceiveCurrencies

        public final ImmutableAccountCurrenciesResult withReceiveCurrencies​(String... elements)
        Copy the current immutable object with elements that replace the content of receiveCurrencies.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withReceiveCurrencies

        public final ImmutableAccountCurrenciesResult withReceiveCurrencies​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of receiveCurrencies. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of receiveCurrencies elements to set
        Returns:
        A modified copy of this object
      • withSendCurrencies

        public final ImmutableAccountCurrenciesResult withSendCurrencies​(String... elements)
        Copy the current immutable object with elements that replace the content of sendCurrencies.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withSendCurrencies

        public final ImmutableAccountCurrenciesResult withSendCurrencies​(Iterable<String> elements)
        Copy the current immutable object with elements that replace the content of sendCurrencies. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of sendCurrencies elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableAccountCurrenciesResult 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: status, ledgerHash, ledgerIndex, ledgerCurrentIndex, validated, receiveCurrencies, sendCurrencies.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableAccountCurrenciesResult copyOf​(AccountCurrenciesResult instance)
        Creates an immutable copy of a AccountCurrenciesResult 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 AccountCurrenciesResult instance