io.honnix.rkt.launcher.output.ConfigOutputBuilder Maven / Gradle / Ivy
package io.honnix.rkt.launcher.output;
import io.honnix.rkt.launcher.model.config.Config;
import io.norberg.automatter.AutoMatter;
import javax.annotation.Generated;
@Generated("io.norberg.automatter.processor.AutoMatterProcessor")
public final class ConfigOutputBuilder {
private Config config;
public ConfigOutputBuilder() {
}
private ConfigOutputBuilder(ConfigOutput v) {
this.config = v.config();
}
private ConfigOutputBuilder(ConfigOutputBuilder v) {
this.config = v.config;
}
public Config config() {
return config;
}
public ConfigOutputBuilder config(Config config) {
if (config == null) {
throw new NullPointerException("config");
}
this.config = config;
return this;
}
public ConfigOutput build() {
return new Value(config);
}
public static ConfigOutputBuilder from(ConfigOutput v) {
return new ConfigOutputBuilder(v);
}
public static ConfigOutputBuilder from(ConfigOutputBuilder v) {
return new ConfigOutputBuilder(v);
}
private static final class Value implements ConfigOutput {
private final Config config;
private Value(@AutoMatter.Field("config") Config config) {
if (config == null) {
throw new NullPointerException("config");
}
this.config = config;
}
@AutoMatter.Field
@Override
public Config config() {
return config;
}
public ConfigOutputBuilder builder() {
return new ConfigOutputBuilder(this);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ConfigOutput)) {
return false;
}
final ConfigOutput that = (ConfigOutput) o;
if (config != null ? !config.equals(that.config()) : that.config() != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = 1;
long temp;
result = 31 * result + (config != null ? config.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "ConfigOutput{" +
"config=" + config +
'}';
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy