I'm looking at class called Product which includes the following:
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
public Product withName(String name) {
this.name = name;
return this;
}
what is the purpose of the withName method and how is it used? Why not just do:
Product p = new Product();
p.setName("foo");