Skip to content
31 changes: 26 additions & 5 deletions src/main/java/net/datafaker/providers/food/Cheese.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import net.datafaker.providers.base.AbstractProvider;

/**
* Generates cheese-related fake data: type, texture, milk, color, name.
* Generates cheese-related fake data: type, texture, milk, color, name etc.
* <p>
* Data source:
* <a href="https://www.cheese.com">cheese.com</a>
* <a href="https://en.wikipedia.org/wiki/Types_of_cheese">Types_of_cheese</a>
* <a href="https://en.wikipedia.org/wiki/Types_of_cheese">Types of cheese</a>
* <a href="https://www.tasteatlas.com/cheese/products">Cheese producers</a>
* <a href="https://www.wisconsincheese.com/the-cheese-life/article/31/cheese-rinds">Cheese rinds</a>
* <a href="https://www.bluecart.com/blog/cheese-packaging-materials">Cheese packaging</a>
* </p>
* @since 2.6.0
*/
Expand Down Expand Up @@ -37,13 +40,31 @@ public String name() {
return resolve("cheese.name");
}

public String producer() {
return resolve("cheese.producer");
}

public String rind() {
return resolve("cheese.rind");
}

public String rindEdibility () {
return resolve("cheese.rind_edibility");
}

public String packaging () {
return resolve("cheese.packaging");
}

/**
* @return a complete wedge of cheese case bundling {@link #name()},
* {@link #type()}, {@link #texture()}, {@link #color()}, and {@link #milk()}.
* {@link #type()}, {@link #producer()}, {@link #texture()}, {@link #color()},
* {@link #milk(), {@link #rind(), {@link #rindEdibility(), and {@link #packaging ()}.
*/
public Wedge wedge() {
return new Wedge(name(), type(), texture(), color(), milk());
return new Wedge(name(), type(), producer(), texture(), color(), milk(), rind(), rindEdibility(), packaging());
}

public record Wedge(String name, String type, String texture, String color, String milk) { }
public record Wedge(String name, String type, String producer, String texture, String color, String milk,
String rind, String rindEdibility, String packaging) { }
}
Loading
Loading