Back to project page WineDB.
The source code is released under:
MIT License
If you think the Android project WineDB listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.selesse.android.winedb.winescraper.impl; /* ww w. j a v a2 s .c om*/ import com.google.common.collect.Lists; import com.selesse.android.winedb.database.Wine; import com.selesse.android.winedb.winescraper.AbstractWineResponse; import com.selesse.android.winedb.winescraper.WineResponse; import java.util.List; @SuppressWarnings("UnusedDeclaration") public class UPCDatabaseOrgResponse extends AbstractWineResponse implements WineResponse { // unused, but needed for GSON private String valid; private String reason; private String itemName; private String description; private String price; @Override public int getResultsSize() { if (valid.equals("false")) { return 0; } return 1; } @Override public List<Wine> convertResponsesToWineList() { List<Wine> wines = Lists.newArrayList(); Wine wine = new Wine(); wine.setName(itemName); wine.setDescription(description); if (!price.equals("0.00")) { wine.setPrice(price); } wines.add(wine); return wines; } }