org.immutables.fixture.ImmutableSing3 Maven / Gradle / Ivy
Show all versions of value-fixture Show documentation
package org.immutables.fixture;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;
import org.immutables.value.Generated;
/**
* Immutable implementation of {@link Sing3}.
*
* Use the static factory method to create immutable instances:
* {@code ImmutableSing3.of()}.
*/
@Generated(from = "Sing3", generator = "Immutables")
@SuppressWarnings({"all"})
@ParametersAreNonnullByDefault
@javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
final class ImmutableSing3 implements Sing3 {
private ImmutableSing3() {
}
/**
* This instance is equal to all instances of {@code ImmutableSing3} 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 ImmutableSing3
&& equalTo(0, (ImmutableSing3) another);
}
@SuppressWarnings("MethodCanBeStatic")
private boolean equalTo(int synthetic, ImmutableSing3 another) {
return true;
}
/**
* Returns a constant hash code value.
* @return hashCode value
*/
@Override
public int hashCode() {
return 1828902699;
}
/**
* Prints the immutable value {@code Sing3}.
* @return A string representation of the value
*/
@Override
public String toString() {
return "Sing3{}";
}
/**
* Construct a new immutable {@code Sing3} instance.
* @return An immutable Sing3 instance
*/
public static ImmutableSing3 of() {
return new ImmutableSing3();
}
/**
* Creates an immutable copy of a {@link Sing3} 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 Sing3 instance
*/
public static ImmutableSing3 copyOf(Sing3 instance) {
if (instance instanceof ImmutableSing3) {
return (ImmutableSing3) instance;
}
return ImmutableSing3.of();
}
}