]> git.ktnx.net Git - mobile-ledger.git/blob - app/src/main/java/net/ktnx/mobileledger/json/ParsedPrice.java
a step towards API-independent JSON parsing of accounts
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / json / ParsedPrice.java
1 /*
2  * Copyright © 2020 Damyan Ivanov.
3  * This file is part of MoLe.
4  * MoLe is free software: you can distribute it and/or modify it
5  * under the term of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your opinion), any later version.
8  *
9  * MoLe is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License terms for details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with MoLe. If not, see <https://www.gnu.org/licenses/>.
16  */
17
18 package net.ktnx.mobileledger.json;
19
20 import net.ktnx.mobileledger.json.v1_15.ParsedQuantity;
21 import net.ktnx.mobileledger.json.v1_15.ParsedStyle;
22
23 public class ParsedPrice {
24     private String tag;
25     private Contents contents;
26     public ParsedPrice() {
27         tag = "NoPrice";
28     }
29     public Contents getContents() {
30         return contents;
31     }
32     public void setContents(Contents contents) {
33         this.contents = contents;
34     }
35     public String getTag() {
36         return tag;
37     }
38     public void setTag(String tag) {
39         this.tag = tag;
40     }
41     private static class Contents {
42         private ParsedPrice aprice;
43         private net.ktnx.mobileledger.json.v1_15.ParsedQuantity aquantity;
44         private String acommodity;
45         private boolean aismultiplier;
46         private net.ktnx.mobileledger.json.v1_15.ParsedStyle astyle;
47         public Contents() {
48             acommodity = "";
49         }
50         public ParsedPrice getAprice() {
51             return aprice;
52         }
53         public void setAprice(ParsedPrice aprice) {
54             this.aprice = aprice;
55         }
56         public net.ktnx.mobileledger.json.v1_15.ParsedQuantity getAquantity() {
57             return aquantity;
58         }
59         public void setAquantity(ParsedQuantity aquantity) {
60             this.aquantity = aquantity;
61         }
62         public String getAcommodity() {
63             return acommodity;
64         }
65         public void setAcommodity(String acommodity) {
66             this.acommodity = acommodity;
67         }
68         public boolean isAismultiplier() {
69             return aismultiplier;
70         }
71         public void setAismultiplier(boolean aismultiplier) {
72             this.aismultiplier = aismultiplier;
73         }
74         public net.ktnx.mobileledger.json.v1_15.ParsedStyle getAstyle() {
75             return astyle;
76         }
77         public void setAstyle(ParsedStyle astyle) {
78             this.astyle = astyle;
79         }
80     }
81 }