Class ImmutableDefaultSeed

java.lang.Object
org.xrpl.xrpl4j.crypto.Seed.DefaultSeed
org.xrpl.xrpl4j.crypto.ImmutableDefaultSeed
All Implemented Interfaces:
Seed

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDefaultSeed extends Seed.DefaultSeed
Immutable implementation of Seed.DefaultSeed.

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

  • Method Details

    • value

      public String value()
      Description copied from interface: Seed
      The seed value, as a Base58-encoded string.
      Specified by:
      value in interface Seed
      Specified by:
      value in class Seed.DefaultSeed
      Returns:
      The value of the value attribute
    • withValue

      public final ImmutableDefaultSeed withValue(String value)
      Copy the current immutable object by setting a value for the value attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for value
      Returns:
      A modified copy of the this object
    • equals

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

      public Decoded decodedSeed()
      The decoded details of this seed.

      Returns a lazily initialized value of the decodedSeed attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Specified by:
      decodedSeed in interface Seed
      Overrides:
      decodedSeed in class Seed.DefaultSeed
      Returns:
      A lazily initialized value of the decodedSeed attribute
    • copyOf

      public static ImmutableDefaultSeed copyOf(Seed.DefaultSeed instance)
      Creates an immutable copy of a Seed.DefaultSeed 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 DefaultSeed instance
    • builder

      public static ImmutableDefaultSeed.Builder builder()
      Creates a builder for ImmutableDefaultSeed.
       ImmutableDefaultSeed.builder()
          .value(String) // required value
          .build();
       
      Returns:
      A new ImmutableDefaultSeed builder