Class ImmutableSPFResult


  • @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableSPFResult
    extends SPFResult
    Immutable implementation of SPFResult.

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

    • Method Detail

      • withVersion

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

        public final ImmutableSPFResult withVersion​(Optional<Integer> optional)
        Copy the current immutable object by setting an optional value for the version 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 version
        Returns:
        A modified copy of this object
      • withMailExchangeQualifier

        public final ImmutableSPFResult withMailExchangeQualifier​(SPFQualifier value)
        Copy the current immutable object by setting a present value for the optional mailExchangeQualifier attribute.
        Parameters:
        value - The value for mailExchangeQualifier
        Returns:
        A modified copy of this object
      • withMailExchangeQualifier

        public final ImmutableSPFResult withMailExchangeQualifier​(Optional<? extends SPFQualifier> optional)
        Copy the current immutable object by setting an optional value for the mailExchangeQualifier 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 mailExchangeQualifier
        Returns:
        A modified copy of this object
      • withAQualifier

        public final ImmutableSPFResult withAQualifier​(SPFQualifier value)
        Copy the current immutable object by setting a present value for the optional aQualifier attribute.
        Parameters:
        value - The value for aQualifier
        Returns:
        A modified copy of this object
      • withAQualifier

        public final ImmutableSPFResult withAQualifier​(Optional<? extends SPFQualifier> optional)
        Copy the current immutable object by setting an optional value for the aQualifier 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 aQualifier
        Returns:
        A modified copy of this object
      • withIp4Records

        public final ImmutableSPFResult withIp4Records​(SPFElement... elements)
        Copy the current immutable object with elements that replace the content of ip4Records.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withIp4Records

        public final ImmutableSPFResult withIp4Records​(Iterable<? extends SPFElement> elements)
        Copy the current immutable object with elements that replace the content of ip4Records. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of ip4Records elements to set
        Returns:
        A modified copy of this object
      • withIp6Records

        public final ImmutableSPFResult withIp6Records​(SPFElement... elements)
        Copy the current immutable object with elements that replace the content of ip6Records.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withIp6Records

        public final ImmutableSPFResult withIp6Records​(Iterable<? extends SPFElement> elements)
        Copy the current immutable object with elements that replace the content of ip6Records. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of ip6Records elements to set
        Returns:
        A modified copy of this object
      • withAllQualifier

        public final ImmutableSPFResult withAllQualifier​(SPFQualifier value)
        Copy the current immutable object by setting a present value for the optional allQualifier attribute.
        Parameters:
        value - The value for allQualifier
        Returns:
        A modified copy of this object
      • withAllQualifier

        public final ImmutableSPFResult withAllQualifier​(Optional<? extends SPFQualifier> optional)
        Copy the current immutable object by setting an optional value for the allQualifier 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 allQualifier
        Returns:
        A modified copy of this object
      • withIncludeRecords

        public final ImmutableSPFResult withIncludeRecords​(SPFElement... elements)
        Copy the current immutable object with elements that replace the content of includeRecords.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withIncludeRecords

        public final ImmutableSPFResult withIncludeRecords​(Iterable<? extends SPFElement> elements)
        Copy the current immutable object with elements that replace the content of includeRecords. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of includeRecords elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(Object another)
        This instance is equal to all instances of ImmutableSPFResult 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: version, mailExchangeQualifier, aQualifier, ip4Records, ip6Records, allQualifier, includeRecords.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • copyOf

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

        public static ImmutableSPFResult.Builder builder()
        Creates a builder for ImmutableSPFResult.
         ImmutableSPFResult.builder()
            .version(Integer) // optional version
            .mailExchangeQualifier(net.rpcnet.securitytoolkit.mail.spf.SPFQualifier) // optional mailExchangeQualifier
            .aQualifier(net.rpcnet.securitytoolkit.mail.spf.SPFQualifier) // optional aQualifier
            .addIp4Records|addAllIp4Records(net.rpcnet.securitytoolkit.mail.spf.SPFElement) // ip4Records elements
            .addIp6Records|addAllIp6Records(net.rpcnet.securitytoolkit.mail.spf.SPFElement) // ip6Records elements
            .allQualifier(net.rpcnet.securitytoolkit.mail.spf.SPFQualifier) // optional allQualifier
            .addIncludeRecords|addAllIncludeRecords(net.rpcnet.securitytoolkit.mail.spf.SPFElement) // includeRecords elements
            .build();
         
        Returns:
        A new ImmutableSPFResult builder