Class ImmutableLedgerRequestParams

    • Method Detail

      • ledgerSpecifier

        public LedgerSpecifier ledgerSpecifier()
        Specifies the ledger version to request. A ledger version can be specified by ledger hash, numerical ledger index, or a shortcut value.
        Specified by:
        ledgerSpecifier in interface LedgerRequestParams
        Returns:
        A LedgerSpecifier specifying the ledger version to request.
      • full

        public boolean full()
        If true, return full information on the entire ledger. Ignored if you did not specify a ledgerHash in ledgerSpecifier()}. Defaults to false. (Equivalent to enabling transactions, accounts, and expand.)

        Caution: This is a very large amount of data -- on the order of several hundred megabytes!

        Note: You must be a rippled Admin to set to true.

        Specified by:
        full in interface LedgerRequestParams
        Returns:
        true if requesting full information on the entire ledger, otherwise false. Defaults to false.
      • accounts

        public boolean accounts()
        If true, return information on accounts in the ledger. Ignored if you did not specify a ledgerHash in ledgerSpecifier()}.

        Caution: This returns a very large amount of data!

        Note: You must be a rippled Admin to set to true.

        Specified by:
        accounts in interface LedgerRequestParams
        Returns:
        true if requesting account information, otherwise false. Defaults to false.
      • transactions

        public boolean transactions()
        If true, return information on transactions in the specified ledger version. Defaults to false. Ignored if you did not specify a ledgerHash in ledgerSpecifier()}.
        Specified by:
        transactions in interface LedgerRequestParams
        Returns:
        true if requesting transactions, otherwise false. Defaults to false.
      • expand

        public boolean expand()
        Provide full JSON-formatted information for transaction/account information instead of only hashes. Defaults to false. Ignored unless you request transactions(), accounts(), or both.
        Specified by:
        expand in interface LedgerRequestParams
        Returns:
        true if requesting expanded transactions, otherwise false. Always true.
      • ownerFunds

        public boolean ownerFunds()
        If true, include the "owner_funds" field in the metadata of OfferCreate transactions in the response. Defaults to false. Ignored unless transactions() and expand() are true.
        Specified by:
        ownerFunds in interface LedgerRequestParams
        Returns:
        true if requesting the "owner_funds" field, otherwise false. Defaults to false.
      • binary

        public boolean binary()
        If true, and transactions() and expand() are both also true, return transaction information in binary format (hexadecimal string) instead of JSON format.
        Specified by:
        binary in interface LedgerRequestParams
        Returns:
        true if requesting transactions in binary format, otherwise false. Always false.
      • queue

        public boolean queue()
        If true, and the command is requesting the current ledger, includes an array of queued transactions in the results.
        Specified by:
        queue in interface LedgerRequestParams
        Returns:
        true if requesting queued transactions, otherwise false. Defaults to false.
      • withLedgerHash

        @Deprecated
        public final ImmutableLedgerRequestParams withLedgerHash​(Hash256 value)
        Deprecated.
        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

        @Deprecated
        public final ImmutableLedgerRequestParams withLedgerHash​(Optional<? extends Hash256> optional)
        Deprecated.
        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 ImmutableLedgerRequestParams 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
      • withLedgerSpecifier

        public final ImmutableLedgerRequestParams withLedgerSpecifier​(LedgerSpecifier value)
        Copy the current immutable object by setting a value for the ledgerSpecifier attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for ledgerSpecifier
        Returns:
        A modified copy of the this object
      • withFull

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

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

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

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

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

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableLedgerRequestParams 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: ledgerSpecifier, full, accounts, transactions, expand, ownerFunds, binary, queue.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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