Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package kontrolltoo;
- import java.text.SimpleDateFormat;
- import org.codehaus.jackson.annotate.JsonCreator;
- import org.codehaus.jackson.annotate.JsonIgnoreProperties;
- import org.codehaus.jackson.annotate.JsonProperty;
- @JsonIgnoreProperties(ignoreUnknown=true)
- public class CurrencyJSON {
- @JsonProperty("name")
- private String name;
- @JsonProperty("fullname")
- private String fullname;
- @JsonProperty("country")
- private String country;
- @JsonProperty("symbol")
- private String symbol;
- public CurrencyJSON(){}
- @JsonCreator
- public CurrencyJSON(String name, String fullname, String country, String symbol)
- {
- this.name=name;
- this.fullname=fullname;
- this.country=country;
- this.symbol=symbol;
- }
- // omadused
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getCountry() {
- return country;
- }
- public void setCountry(String country) {
- this.country = country;
- }
- public String getFullname() {
- return fullname;
- }
- public void setFullname(String fullname) {
- this.fullname = fullname;
- }
- public String getSymbol() {
- return symbol;
- }
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
- @Override
- public String toString(){
- return String.format("\n name: %s \n fullname: %s \n country: %s \n symbol: %s \n"
- ,name, fullname,country, symbol);
- }
- }
Add Comment
Please, Sign In to add comment