-
Notifications
You must be signed in to change notification settings - Fork 236
Expand file tree
/
Copy pathCheese.java
More file actions
70 lines (56 loc) · 2.03 KB
/
Cheese.java
File metadata and controls
70 lines (56 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package net.datafaker.providers.food;
import net.datafaker.providers.base.AbstractProvider;
/**
* 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://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
*/
public class Cheese extends AbstractProvider<FoodProviders> {
protected Cheese(FoodProviders faker) {
super(faker);
}
public String type() {
return resolve("cheese.type");
}
public String texture() {
return resolve("cheese.texture");
}
public String milk() {
return resolve("cheese.milk");
}
public String color() {
return resolve("cheese.color");
}
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 #producer()}, {@link #texture()}, {@link #color()},
* {@link #milk()}, {@link #rind()}, {@link #rindEdibility()}, and {@link #packaging()}.
*/
public Wedge wedge() {
return new Wedge(name(), type(), producer(), texture(), color(), milk(), rind(), rindEdibility(), packaging());
}
public record Wedge(String name, String type, String producer, String texture, String color, String milk,
String rind, String rindEdibility, String packaging) { }
}