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