Class ImmutableSPFResult
- java.lang.Object
-
- net.rpcnet.securitytoolkit.mail.spf.SPFResult
-
- net.rpcnet.securitytoolkit.mail.spf.ImmutableSPFResult
-
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableSPFResult extends SPFResult
Immutable implementation ofSPFResult.Use the builder to create immutable instances:
ImmutableSPFResult.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSPFResult.BuilderBuilds instances of typeImmutableSPFResult.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSPFResult.Builderbuilder()Creates a builder forImmutableSPFResult.static ImmutableSPFResultcopyOf(SPFResult instance)Creates an immutable copy of aSPFResultvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSPFResultthat have equal attribute values.Optional<SPFQualifier>getAllQualifier()Optional<SPFQualifier>getAQualifier()List<SPFElement>getIncludeRecords()List<SPFElement>getIp4Records()List<SPFElement>getIp6Records()Optional<SPFQualifier>getMailExchangeQualifier()Optional<Integer>getVersion()inthashCode()Computes a hash code from attributes:version,mailExchangeQualifier,aQualifier,ip4Records,ip6Records,allQualifier,includeRecords.ImmutableSPFResultwithAllQualifier(Optional<? extends SPFQualifier> optional)Copy the current immutable object by setting an optional value for theallQualifierattribute.ImmutableSPFResultwithAllQualifier(SPFQualifier value)Copy the current immutable object by setting a present value for the optionalallQualifierattribute.ImmutableSPFResultwithAQualifier(Optional<? extends SPFQualifier> optional)Copy the current immutable object by setting an optional value for theaQualifierattribute.ImmutableSPFResultwithAQualifier(SPFQualifier value)Copy the current immutable object by setting a present value for the optionalaQualifierattribute.ImmutableSPFResultwithIncludeRecords(Iterable<? extends SPFElement> elements)Copy the current immutable object with elements that replace the content ofincludeRecords.ImmutableSPFResultwithIncludeRecords(SPFElement... elements)Copy the current immutable object with elements that replace the content ofincludeRecords.ImmutableSPFResultwithIp4Records(Iterable<? extends SPFElement> elements)Copy the current immutable object with elements that replace the content ofip4Records.ImmutableSPFResultwithIp4Records(SPFElement... elements)Copy the current immutable object with elements that replace the content ofip4Records.ImmutableSPFResultwithIp6Records(Iterable<? extends SPFElement> elements)Copy the current immutable object with elements that replace the content ofip6Records.ImmutableSPFResultwithIp6Records(SPFElement... elements)Copy the current immutable object with elements that replace the content ofip6Records.ImmutableSPFResultwithMailExchangeQualifier(Optional<? extends SPFQualifier> optional)Copy the current immutable object by setting an optional value for themailExchangeQualifierattribute.ImmutableSPFResultwithMailExchangeQualifier(SPFQualifier value)Copy the current immutable object by setting a present value for the optionalmailExchangeQualifierattribute.ImmutableSPFResultwithVersion(int value)Copy the current immutable object by setting a present value for the optionalversionattribute.ImmutableSPFResultwithVersion(Optional<Integer> optional)Copy the current immutable object by setting an optional value for theversionattribute.
-
-
-
Method Detail
-
getVersion
public Optional<Integer> getVersion()
- Specified by:
getVersionin classSPFResult- Returns:
- The value of the
versionattribute
-
getMailExchangeQualifier
public Optional<SPFQualifier> getMailExchangeQualifier()
- Specified by:
getMailExchangeQualifierin classSPFResult- Returns:
- The value of the
mailExchangeQualifierattribute
-
getAQualifier
public Optional<SPFQualifier> getAQualifier()
- Specified by:
getAQualifierin classSPFResult- Returns:
- The value of the
aQualifierattribute
-
getIp4Records
public List<SPFElement> getIp4Records()
- Specified by:
getIp4Recordsin classSPFResult- Returns:
- The value of the
ip4Recordsattribute
-
getIp6Records
public List<SPFElement> getIp6Records()
- Specified by:
getIp6Recordsin classSPFResult- Returns:
- The value of the
ip6Recordsattribute
-
getAllQualifier
public Optional<SPFQualifier> getAllQualifier()
- Specified by:
getAllQualifierin classSPFResult- Returns:
- The value of the
allQualifierattribute
-
getIncludeRecords
public List<SPFElement> getIncludeRecords()
- Specified by:
getIncludeRecordsin classSPFResult- Returns:
- The value of the
includeRecordsattribute
-
withVersion
public final ImmutableSPFResult withVersion(int value)
Copy the current immutable object by setting a present value for the optionalversionattribute.- Parameters:
value- The value for version- Returns:
- A modified copy of
thisobject
-
withVersion
public final ImmutableSPFResult withVersion(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for theversionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for version- Returns:
- A modified copy of
thisobject
-
withMailExchangeQualifier
public final ImmutableSPFResult withMailExchangeQualifier(SPFQualifier value)
Copy the current immutable object by setting a present value for the optionalmailExchangeQualifierattribute.- Parameters:
value- The value for mailExchangeQualifier- Returns:
- A modified copy of
thisobject
-
withMailExchangeQualifier
public final ImmutableSPFResult withMailExchangeQualifier(Optional<? extends SPFQualifier> optional)
Copy the current immutable object by setting an optional value for themailExchangeQualifierattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for mailExchangeQualifier- Returns:
- A modified copy of
thisobject
-
withAQualifier
public final ImmutableSPFResult withAQualifier(SPFQualifier value)
Copy the current immutable object by setting a present value for the optionalaQualifierattribute.- Parameters:
value- The value for aQualifier- Returns:
- A modified copy of
thisobject
-
withAQualifier
public final ImmutableSPFResult withAQualifier(Optional<? extends SPFQualifier> optional)
Copy the current immutable object by setting an optional value for theaQualifierattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for aQualifier- Returns:
- A modified copy of
thisobject
-
withIp4Records
public final ImmutableSPFResult withIp4Records(SPFElement... elements)
Copy the current immutable object with elements that replace the content ofip4Records.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIp4Records
public final ImmutableSPFResult withIp4Records(Iterable<? extends SPFElement> elements)
Copy the current immutable object with elements that replace the content ofip4Records. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of ip4Records elements to set- Returns:
- A modified copy of
thisobject
-
withIp6Records
public final ImmutableSPFResult withIp6Records(SPFElement... elements)
Copy the current immutable object with elements that replace the content ofip6Records.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIp6Records
public final ImmutableSPFResult withIp6Records(Iterable<? extends SPFElement> elements)
Copy the current immutable object with elements that replace the content ofip6Records. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of ip6Records elements to set- Returns:
- A modified copy of
thisobject
-
withAllQualifier
public final ImmutableSPFResult withAllQualifier(SPFQualifier value)
Copy the current immutable object by setting a present value for the optionalallQualifierattribute.- Parameters:
value- The value for allQualifier- Returns:
- A modified copy of
thisobject
-
withAllQualifier
public final ImmutableSPFResult withAllQualifier(Optional<? extends SPFQualifier> optional)
Copy the current immutable object by setting an optional value for theallQualifierattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for allQualifier- Returns:
- A modified copy of
thisobject
-
withIncludeRecords
public final ImmutableSPFResult withIncludeRecords(SPFElement... elements)
Copy the current immutable object with elements that replace the content ofincludeRecords.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIncludeRecords
public final ImmutableSPFResult withIncludeRecords(Iterable<? extends SPFElement> elements)
Copy the current immutable object with elements that replace the content ofincludeRecords. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of includeRecords elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableSPFResultthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:version,mailExchangeQualifier,aQualifier,ip4Records,ip6Records,allQualifier,includeRecords.
-
copyOf
public static ImmutableSPFResult copyOf(SPFResult instance)
Creates an immutable copy of aSPFResultvalue. 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 forImmutableSPFResult.ImmutableSPFResult.builder() .version(Integer) // optionalversion.mailExchangeQualifier(net.rpcnet.securitytoolkit.mail.spf.SPFQualifier) // optionalmailExchangeQualifier.aQualifier(net.rpcnet.securitytoolkit.mail.spf.SPFQualifier) // optionalaQualifier.addIp4Records|addAllIp4Records(net.rpcnet.securitytoolkit.mail.spf.SPFElement) //ip4Recordselements .addIp6Records|addAllIp6Records(net.rpcnet.securitytoolkit.mail.spf.SPFElement) //ip6Recordselements .allQualifier(net.rpcnet.securitytoolkit.mail.spf.SPFQualifier) // optionalallQualifier.addIncludeRecords|addAllIncludeRecords(net.rpcnet.securitytoolkit.mail.spf.SPFElement) //includeRecordselements .build();- Returns:
- A new ImmutableSPFResult builder
-
-