Class ImmutableLedgerSpecifier

    • Method Detail

      • withLedgerHash

        public final ImmutableLedgerSpecifier 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 ImmutableLedgerSpecifier 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

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

        public final ImmutableLedgerSpecifier withLedgerIndex​(Optional<? extends LedgerIndex> optional)
        Copy the current immutable object by setting an optional value for the ledgerIndex 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 ledgerIndex
        Returns:
        A modified copy of this object
      • withLedgerIndexShortcut

        public final ImmutableLedgerSpecifier withLedgerIndexShortcut​(LedgerIndexShortcut value)
        Copy the current immutable object by setting a present value for the optional ledgerIndexShortcut attribute.
        Parameters:
        value - The value for ledgerIndexShortcut
        Returns:
        A modified copy of this object
      • withLedgerIndexShortcut

        public final ImmutableLedgerSpecifier withLedgerIndexShortcut​(Optional<? extends LedgerIndexShortcut> optional)
        Copy the current immutable object by setting an optional value for the ledgerIndexShortcut 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 ledgerIndexShortcut
        Returns:
        A modified copy of this object
      • equals

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

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

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

        public static ImmutableLedgerSpecifier.Builder builder()
        Creates a builder for ImmutableLedgerSpecifier.
         ImmutableLedgerSpecifier.builder()
            .ledgerHash(org.xrpl.xrpl4j.model.transactions.Hash256) // optional ledgerHash
            .ledgerIndex(org.xrpl.xrpl4j.model.client.common.LedgerIndex) // optional ledgerIndex
            .ledgerIndexShortcut(org.xrpl.xrpl4j.model.client.common.LedgerIndexShortcut) // optional ledgerIndexShortcut
            .build();
         
        Returns:
        A new ImmutableLedgerSpecifier builder