Class ImmutableFormValidationError

    • Method Detail

      • withItemId

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

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

        public final ImmutableFormValidationError withLevel​(FormValidationError.Level value)
        Copy the current immutable object by setting a value for the level attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for level
        Returns:
        A modified copy of the this object
      • withType

        public final ImmutableFormValidationError withType​(FormValidationError.Type value)
        Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for type (can be null)
        Returns:
        A modified copy of the this object
      • withExpression

        public final ImmutableFormValidationError withExpression​(String value)
        Copy the current immutable object by setting a present value for the optional expression attribute.
        Parameters:
        value - The value for expression
        Returns:
        A modified copy of this object
      • withExpression

        public final ImmutableFormValidationError withExpression​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the expression attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for expression
        Returns:
        A modified copy of this object
      • withStartIndex

        public final ImmutableFormValidationError withStartIndex​(int value)
        Copy the current immutable object by setting a present value for the optional startIndex attribute.
        Parameters:
        value - The value for startIndex
        Returns:
        A modified copy of this object
      • withStartIndex

        public final ImmutableFormValidationError withStartIndex​(Optional<Integer> optional)
        Copy the current immutable object by setting an optional value for the startIndex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for startIndex
        Returns:
        A modified copy of this object
      • withEndIndex

        public final ImmutableFormValidationError withEndIndex​(int value)
        Copy the current immutable object by setting a present value for the optional endIndex attribute.
        Parameters:
        value - The value for endIndex
        Returns:
        A modified copy of this object
      • withEndIndex

        public final ImmutableFormValidationError withEndIndex​(Optional<Integer> optional)
        Copy the current immutable object by setting an optional value for the endIndex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for endIndex
        Returns:
        A modified copy of this object
      • withIndex

        public final ImmutableFormValidationError withIndex​(int value)
        Copy the current immutable object by setting a present value for the optional index attribute.
        Parameters:
        value - The value for index
        Returns:
        A modified copy of this object
      • withIndex

        public final ImmutableFormValidationError withIndex​(Optional<Integer> optional)
        Copy the current immutable object by setting an optional value for the index attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for index
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableFormValidationError 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: itemId, message, level, type, expression, startIndex, endIndex, index.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableFormValidationError.Builder builder()
        Creates a builder for ImmutableFormValidationError.
         ImmutableFormValidationError.builder()
            .itemId(String | null) // nullable itemId
            .message(String | null) // nullable message
            .level(io.dialob.api.form.FormValidationError.Level) // optional level
            .type(io.dialob.api.form.FormValidationError.Type | null) // nullable type
            .expression(String) // optional expression
            .startIndex(Integer) // optional startIndex
            .endIndex(Integer) // optional endIndex
            .index(Integer) // optional index
            .build();
         
        Returns:
        A new ImmutableFormValidationError builder