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

com.studerw.tda.model.history.PriceHistory Maven / Gradle / Ivy

There is a newer version: 2.4.3
Show newest version
package com.studerw.tda.model.history;

import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * PriceHistory meant to display on a graph
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
    "candles",
    "empty",
    "symbol"
})
public class PriceHistory implements Serializable {

  private final static long serialVersionUID = -1691611288512481647L;
  /**
   * List of candles
   */
  @JsonProperty("candles")
  private List candles = new ArrayList<>();
  @JsonProperty("empty")
  private Boolean empty;
  @JsonProperty("symbol")
  private String symbol;
  @JsonAnySetter
  private Map otherFields = new HashMap<>();

  public List getCandles() {
    return candles;
  }

  public Boolean isEmpty() {
    return empty;
  }

  public String getSymbol() {
    return symbol;
  }

  @JsonIgnore
  public Map getOtherFields() {
    return otherFields;
  }

  @Override
  public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
        .append("empty", empty)
        .append("symbol", symbol)
        .append("candles:", candles)
        .append("otherFields", otherFields)
        .toString();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy