Back to project page bitpay-android-sdk.
The source code is released under:
MIT License
If you think the Android project bitpay-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.androidsdk.model; //from ww w . jav a 2 s. c o m 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; } }