You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

37 lines
1.6 KiB

public class CrawlResult {
private String title;
private double price;
private double originalPrice;
private double discount;
private String imageUrl;
private String authorOrSeller;
public CrawlResult() {}
public CrawlResult(String title, double price, double originalPrice, double discount, String imageUrl, String authorOrSeller) {
this.title = title;
this.price = price;
this.originalPrice = originalPrice;
this.discount = discount;
this.imageUrl = imageUrl;
this.authorOrSeller = authorOrSeller;
}
public String getTitle() { return title; }
public void setTitle(String title) { this.title = title; }
public double getPrice() { return price; }
public void setPrice(double price) { this.price = price; }
public double getOriginalPrice() { return originalPrice; }
public void setOriginalPrice(double originalPrice) { this.originalPrice = originalPrice; }
public double getDiscount() { return discount; }
public void setDiscount(double discount) { this.discount = discount; }
public String getImageUrl() { return imageUrl; }
public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; }
public String getAuthorOrSeller() { return authorOrSeller; }
public void setAuthorOrSeller(String authorOrSeller) { this.authorOrSeller = authorOrSeller; }
public String toString() {
return String.format("CrawlResult{title='%s', price=%.2f, originalPrice=%.2f, discount=%.1f, author='%s'}",
title, price, originalPrice, discount, authorOrSeller);
}
}