import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
}
public static Builder builder(Type type, int ref) {
- return new Builder(type, ref);
+ return new Builder(type, ref).setKey("key_" + ref).setUuid("uuid_" + ref);
}
public static final class Builder {
this.ref = ref;
}
- public Builder setUuid(@Nullable String s) {
- this.uuid = s;
+ public Builder setUuid(String s) {
+ this.uuid = Objects.requireNonNull(s);
return this;
}
return this;
}
- public Builder setKey(@Nullable String s) {
- this.key = s;
+ public Builder setKey(String s) {
+ this.key = Objects.requireNonNull(s);
return this;
}