|
@@ -0,0 +1,61 @@
|
|
|
|
+package com.sf.day08.lambda;
|
|
|
|
+
|
|
|
|
+public class Product {
|
|
|
|
+
|
|
|
|
+ private Long id; // 序号
|
|
|
|
+ private String name; // 商品名称
|
|
|
|
+ private Double price; // 价格
|
|
|
|
+ private String type; // 类型
|
|
|
|
+
|
|
|
|
+ public Product() {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public Product(Long id, String name, Double price, String type) {
|
|
|
|
+ this.id = id;
|
|
|
|
+ this.name = name;
|
|
|
|
+ this.price = price;
|
|
|
|
+ this.type = type;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public Long getId() {
|
|
|
|
+ return id;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setId(Long id) {
|
|
|
|
+ this.id = id;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getName() {
|
|
|
|
+ return name;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setName(String name) {
|
|
|
|
+ this.name = name;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public Double getPrice() {
|
|
|
|
+ return price;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setPrice(Double price) {
|
|
|
|
+ this.price = price;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getType() {
|
|
|
|
+ return type;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setType(String type) {
|
|
|
|
+ this.type = type;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String toString() {
|
|
|
|
+ return "Product{" +
|
|
|
|
+ "id=" + id +
|
|
|
|
+ ", name='" + name + '\'' +
|
|
|
|
+ ", price=" + price +
|
|
|
|
+ ", type='" + type + '\'' +
|
|
|
|
+ '}';
|
|
|
|
+ }
|
|
|
|
+}
|