Class ImmutablePermissionWrapper

java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutablePermissionWrapper
All Implemented Interfaces:
PermissionWrapper

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

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

  • Method Details

    • permission

      public Permission permission()
      A permission.
      Specified by:
      permission in interface PermissionWrapper
      Returns:
      A Permission.
    • withPermission

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

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

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

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

      public static ImmutablePermissionWrapper.Builder builder()
      Creates a builder for ImmutablePermissionWrapper.
       ImmutablePermissionWrapper.builder()
          .permission(org.xrpl.xrpl4j.model.transactions.Permission) // required permission
          .build();
       
      Returns:
      A new ImmutablePermissionWrapper builder