-
Notifications
You must be signed in to change notification settings - Fork 732
Expand file tree
/
Copy pathProduct.java
More file actions
30 lines (25 loc) · 839 Bytes
/
Product.java
File metadata and controls
30 lines (25 loc) · 839 Bytes
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
package javaprogramming.commonmistakes.java8;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.Arrays;
import java.util.List;
@Data
@AllArgsConstructor
public class Product {
private Long id;
private String name;
private Double price;
public static List<Product> getData() {
return Arrays.asList(
new Product(1L, "苹果", 1.0),
new Product(2L, "桔子", 2.0),
new Product(3L, "香蕉", 3.0),
new Product(4L, "芒果", 4.0),
new Product(5L, "西瓜", 5.0),
new Product(6L, "葡萄", 6.0),
new Product(7L, "桃子", 7.0),
new Product(8L, "椰子", 8.0),
new Product(9L, "菠萝", 9.0),
new Product(10L, "石榴", 10.0));
}
}