Class ImmutableActions

  • All Implemented Interfaces:
    Actions, Serializable

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

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

    See Also:
    Serialized Form
    • Method Detail

      • getRev

        public String getRev()
        Specified by:
        getRev in interface Actions
        Returns:
        The value of the rev attribute
      • getActions

        public List<Action> getActions()
        Specified by:
        getActions in interface Actions
        Returns:
        The value of the actions attribute
      • withRev

        public final ImmutableActions withRev​(String value)
        Copy the current immutable object by setting a value for the rev attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for rev (can be null)
        Returns:
        A modified copy of the this object
      • withActions

        public final ImmutableActions withActions​(Action... elements)
        Copy the current immutable object with elements that replace the content of actions.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withActions

        public final ImmutableActions withActions​(Iterable<? extends Action> elements)
        Copy the current immutable object with elements that replace the content of actions. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of actions 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 ImmutableActions 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: rev, actions.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableActions.Builder builder()
        Creates a builder for ImmutableActions.
         ImmutableActions.builder()
            .rev(String | null) // nullable rev
            .actions(List&lt;io.dialob.api.proto.Action&gt; | null) // nullable actions
            .build();
         
        Returns:
        A new ImmutableActions builder