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

io.mstream.trader.simulation.stocks.datafeed.data.StockPrice Maven / Gradle / Ivy

package io.mstream.trader.simulation.stocks.datafeed.data;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.inject.assistedinject.Assisted;

import javax.inject.Inject;


public class StockPrice {

    private final String value;

    @JsonCreator
    @Inject
    public StockPrice(
            @Assisted("value")
            @JsonProperty("value") String value) {
        this.value = value;
    }
    
    @Override
    public int hashCode() {
        
        return value != null ?
                value.hashCode() :
                0;
    }
    
    @Override
    public boolean equals(Object o) {
        
        if (this == o) { return true; }
        if (o == null || getClass() != o.getClass()) { return false; }
        
        StockPrice that = (StockPrice) o;
        
        return value != null ?
                value.equals(that.value) :
                that.value == null;
        
    }
    
    public String getValue() {
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy