
io.honnix.rkt.launcher.output.image.RmOutputBuilder Maven / Gradle / Ivy
package io.honnix.rkt.launcher.output.image;
import io.norberg.automatter.AutoMatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Generated;
@Generated("io.norberg.automatter.processor.AutoMatterProcessor")
public final class RmOutputBuilder {
private List removed;
public RmOutputBuilder() {
}
private RmOutputBuilder(RmOutput v) {
List extends String> _removed = v.removed();
this.removed = (_removed == null) ? null : new ArrayList(_removed);
}
private RmOutputBuilder(RmOutputBuilder v) {
this.removed = (v.removed == null) ? null : new ArrayList(v.removed);
}
public List removed() {
if (this.removed == null) {
this.removed = new ArrayList();
}
return removed;
}
public RmOutputBuilder removed(List extends String> removed) {
return removed((Collection extends String>) removed);
}
public RmOutputBuilder removed(Collection extends String> removed) {
if (removed == null) {
throw new NullPointerException("removed");
}
for (String item : removed) {
if (item == null) {
throw new NullPointerException("removed: null item");
}
}
this.removed = new ArrayList(removed);
return this;
}
public RmOutputBuilder removed(Iterable extends String> removed) {
if (removed == null) {
throw new NullPointerException("removed");
}
if (removed instanceof Collection) {
return removed((Collection extends String>) removed);
}
return removed(removed.iterator());
}
public RmOutputBuilder removed(Iterator extends String> removed) {
if (removed == null) {
throw new NullPointerException("removed");
}
this.removed = new ArrayList();
while (removed.hasNext()) {
String item = removed.next();
if (item == null) {
throw new NullPointerException("removed: null item");
}
this.removed.add(item);
}
return this;
}
@SafeVarargs
public final RmOutputBuilder removed(String... removed) {
if (removed == null) {
throw new NullPointerException("removed");
}
return removed(Arrays.asList(removed));
}
public RmOutput build() {
List _removed = (removed != null) ? Collections.unmodifiableList(new ArrayList(removed)) : Collections.emptyList();
return new Value(_removed);
}
public static RmOutputBuilder from(RmOutput v) {
return new RmOutputBuilder(v);
}
public static RmOutputBuilder from(RmOutputBuilder v) {
return new RmOutputBuilder(v);
}
private static final class Value implements RmOutput {
private final List removed;
private Value(@AutoMatter.Field("removed") List removed) {
this.removed = (removed != null) ? removed : Collections.emptyList();
}
@AutoMatter.Field
@Override
public List removed() {
return removed;
}
public RmOutputBuilder builder() {
return new RmOutputBuilder(this);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof RmOutput)) {
return false;
}
final RmOutput that = (RmOutput) o;
if (removed != null ? !removed.equals(that.removed()) : that.removed() != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = 1;
long temp;
result = 31 * result + (removed != null ? removed.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "RmOutput{" +
"removed=" + removed +
'}';
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy