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

com.barchart.ondemand.api.responses.SpecialOptionsCategory Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.barchart.ondemand.api.responses;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonProperty;

public class SpecialOptionsCategory {

	@JsonProperty("categoryName")
	private String name;

	@JsonProperty("data")
	private Map data = new HashMap();

	@JsonProperty("sub-categories")
	private List subCategories = new ArrayList();

	private Map additionalProperties = new HashMap();

	public String getName() {
		return name;
	}

	public List getOptionsTypes() {
		final List results = new ArrayList();
		results.addAll(subCategories);

		if (!data.isEmpty()) {
			final SpecialOption single = new SpecialOption();
			single.setName(data.get("name").toString());
			single.setSymbol(data.get("symbol").toString());
			results.add(single);
		}

		return results;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Map getData() {
		return data;
	}

	@JsonAnyGetter
	public Map getAdditionalProperties() {
		return this.additionalProperties;
	}

	@JsonAnySetter
	public void setAdditionalProperty(String name, Object value) {
		this.additionalProperties.put(name, value);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy