Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* Use the builder to create immutable instances:
* {@code ImmutableExploreResult.builder()}.
* Use the static factory method to create immutable instances:
* {@code ImmutableExploreResult.of()}.
*/
@Generated(from = "ExploreResult", generator = "Immutables")
@SuppressWarnings({"all"})
@ParametersAreNonnullByDefault
@javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableExploreResult implements ExploreResult {
private final ExploreResult.Links agentLinks;
private final ExploreResult.Links targetLinks;
private ImmutableExploreResult(
ExploreResult.Links agentLinks,
ExploreResult.Links targetLinks) {
this.agentLinks = Objects.requireNonNull(agentLinks, "agentLinks");
this.targetLinks = Objects.requireNonNull(targetLinks, "targetLinks");
}
private ImmutableExploreResult(
ImmutableExploreResult original,
ExploreResult.Links agentLinks,
ExploreResult.Links targetLinks) {
this.agentLinks = agentLinks;
this.targetLinks = targetLinks;
}
/**
* @return The value of the {@code agentLinks} attribute
*/
@Override
public ExploreResult.Links agentLinks() {
return agentLinks;
}
/**
* @return The value of the {@code targetLinks} attribute
*/
@Override
public ExploreResult.Links targetLinks() {
return targetLinks;
}
/**
* Copy the current immutable object by setting a value for the {@link ExploreResult#agentLinks() agentLinks} attribute.
* A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
* @param value A new value for agentLinks
* @return A modified copy of the {@code this} object
*/
public final ImmutableExploreResult withAgentLinks(ExploreResult.Links value) {
if (this.agentLinks == value) return this;
ExploreResult.Links newValue = Objects.requireNonNull(value, "agentLinks");
return new ImmutableExploreResult(this, newValue, this.targetLinks);
}
/**
* Copy the current immutable object by setting a value for the {@link ExploreResult#targetLinks() targetLinks} attribute.
* A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
* @param value A new value for targetLinks
* @return A modified copy of the {@code this} object
*/
public final ImmutableExploreResult withTargetLinks(ExploreResult.Links value) {
if (this.targetLinks == value) return this;
ExploreResult.Links newValue = Objects.requireNonNull(value, "targetLinks");
return new ImmutableExploreResult(this, this.agentLinks, newValue);
}
/**
* This instance is equal to all instances of {@code ImmutableExploreResult} that have equal attribute values.
* @return {@code true} if {@code this} is equal to {@code another} instance
*/
@Override
public boolean equals(@Nullable Object another) {
if (this == another) return true;
return another instanceof ImmutableExploreResult
&& equalTo(0, (ImmutableExploreResult) another);
}
private boolean equalTo(int synthetic, ImmutableExploreResult another) {
return agentLinks.equals(another.agentLinks)
&& targetLinks.equals(another.targetLinks);
}
/**
* Computes a hash code from attributes: {@code agentLinks}, {@code targetLinks}.
* @return hashCode value
*/
@Override
public int hashCode() {
@Var int h = 5381;
h += (h << 5) + agentLinks.hashCode();
h += (h << 5) + targetLinks.hashCode();
return h;
}
/**
* Prints the immutable value {@code ExploreResult} with attribute values.
* @return A string representation of the value
*/
@Override
public String toString() {
return MoreObjects.toStringHelper("ExploreResult")
.omitNullValues()
.add("agentLinks", agentLinks)
.add("targetLinks", targetLinks)
.toString();
}
/**
* Construct a new immutable {@code ExploreResult} instance.
* @param agentLinks The value for the {@code agentLinks} attribute
* @param targetLinks The value for the {@code targetLinks} attribute
* @return An immutable ExploreResult instance
*/
public static ImmutableExploreResult of(ExploreResult.Links agentLinks, ExploreResult.Links targetLinks) {
return new ImmutableExploreResult(agentLinks, targetLinks);
}
/**
* Creates an immutable copy of a {@link ExploreResult} value.
* Uses accessors to get values to initialize the new immutable instance.
* If an instance is already immutable, it is returned as is.
* @param instance The instance to copy
* @return A copied immutable ExploreResult instance
*/
public static ImmutableExploreResult copyOf(ExploreResult instance) {
if (instance instanceof ImmutableExploreResult) {
return (ImmutableExploreResult) instance;
}
return ImmutableExploreResult.builder()
.from(instance)
.build();
}
/**
* Creates a builder for {@link ImmutableExploreResult ImmutableExploreResult}.
*
* @return A new ImmutableExploreResult builder
*/
public static ImmutableExploreResult.Builder builder() {
return new ImmutableExploreResult.Builder();
}
/**
* Builds instances of type {@link ImmutableExploreResult ImmutableExploreResult}.
* Initialize attributes and then invoke the {@link #build()} method to create an
* immutable instance.
*
{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
* but instead used immediately to create instances.
*/
@Generated(from = "ExploreResult", generator = "Immutables")
@NotThreadSafe
public static final class Builder {
private static final long INIT_BIT_AGENT_LINKS = 0x1L;
private static final long INIT_BIT_TARGET_LINKS = 0x2L;
private long initBits = 0x3L;
private @Nullable ExploreResult.Links agentLinks;
private @Nullable ExploreResult.Links targetLinks;
private Builder() {
}
/**
* Fill a builder with attribute values from the provided {@code ExploreResult} instance.
* Regular attribute values will be replaced with those from the given instance.
* Absent optional values will not replace present values.
* @param instance The instance from which to copy values
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder from(ExploreResult instance) {
Objects.requireNonNull(instance, "instance");
agentLinks(instance.agentLinks());
targetLinks(instance.targetLinks());
return this;
}
/**
* Initializes the value for the {@link ExploreResult#agentLinks() agentLinks} attribute.
* @param agentLinks The value for agentLinks
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder agentLinks(ExploreResult.Links agentLinks) {
this.agentLinks = Objects.requireNonNull(agentLinks, "agentLinks");
initBits &= ~INIT_BIT_AGENT_LINKS;
return this;
}
/**
* Initializes the value for the {@link ExploreResult#targetLinks() targetLinks} attribute.
* @param targetLinks The value for targetLinks
* @return {@code this} builder for use in a chained invocation
*/
@CanIgnoreReturnValue
public final Builder targetLinks(ExploreResult.Links targetLinks) {
this.targetLinks = Objects.requireNonNull(targetLinks, "targetLinks");
initBits &= ~INIT_BIT_TARGET_LINKS;
return this;
}
/**
* Builds a new {@link ImmutableExploreResult ImmutableExploreResult}.
* @return An immutable instance of ExploreResult
* @throws java.lang.IllegalStateException if any required attributes are missing
*/
public ImmutableExploreResult build() {
if (initBits != 0) {
throw new IllegalStateException(formatRequiredAttributesMessage());
}
return new ImmutableExploreResult(null, agentLinks, targetLinks);
}
private String formatRequiredAttributesMessage() {
List attributes = new ArrayList<>();
if ((initBits & INIT_BIT_AGENT_LINKS) != 0) attributes.add("agentLinks");
if ((initBits & INIT_BIT_TARGET_LINKS) != 0) attributes.add("targetLinks");
return "Cannot build ExploreResult, some of required attributes are not set " + attributes;
}
}
/**
* Immutable implementation of {@link ExploreResult.Links}.
*
* Use the builder to create immutable instances:
* {@code ImmutableExploreResult.Links.builder()}.
* Use the static factory method to create immutable instances:
* {@code ImmutableExploreResult.Links.of()}.
*/
@Generated(from = "ExploreResult.Links", generator = "Immutables")
@Immutable
@CheckReturnValue
public static final class Links