Back to project page android-sdk.
The source code is released under:
MIT License
If you think the Android project android-sdk 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.bitpay.sdk.model; /*from w w w . j a va 2 s . com*/ import java.util.List; /** * Hold information about rates for multiple currencies. */ public class Rates { private List<Rate> _rates; public Rates(List<Rate> rates) { _rates = rates; } public List<Rate> getRates() { return _rates; } public void update(List<Rate> rates) { _rates = rates; } public double getRate(String currencyCode) { double val = 0; for (Rate rateObj : _rates) { if (rateObj.getCode().equals(currencyCode)) { val = rateObj.getValue(); break; } } return val; } }