All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bitcoin.blockchain.api.domain.ExchangeModel Maven / Gradle / Ivy

package com.bitcoin.blockchain.api.domain;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Jesion on 2015-05-21.
 */
public class ExchangeModel implements Serializable {

    public Map exchanges;

    public ExchangeModel() {

        exchanges = new HashMap();
    }

    public void addInfo(String key, ExchangeInfo info) {
        exchanges.put(key, info);
    }

    public void updateData(String key, ExchangeData data) {
        ExchangeInfo existingInfo = exchanges.get(key);
        existingInfo.data.vwap = data.vwap;
        existingInfo.data.instrument = data.instrument;
        existingInfo.data.setBid(data.bid);
        existingInfo.data.ask = data.ask;
        existingInfo.data.high = data.high;
        existingInfo.data.volume = data.volume;
        existingInfo.data.low = data.low;
        existingInfo.data.last = data.last;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy