T - Type of object that can contain the retrieved information from a
quotes requestpublic abstract class QuotesRequest<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<QuotesProperty> |
properties |
protected java.lang.String |
query |
| Constructor and Description |
|---|
QuotesRequest(java.lang.String query,
java.util.List<QuotesProperty> properties) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<QuotesProperty> |
getProperties() |
java.lang.String |
getQuery() |
java.util.List<T> |
getResult()
Sends the request to Yahoo Finance and parses the result
|
T |
getSingleResult() |
protected abstract T |
parseCSVLine(java.lang.String line) |
void |
setProperties(java.util.List<QuotesProperty> properties) |
protected final java.lang.String query
protected java.util.List<QuotesProperty> properties
public QuotesRequest(java.lang.String query,
java.util.List<QuotesProperty> properties)
public java.lang.String getQuery()
public java.util.List<QuotesProperty> getProperties()
public void setProperties(java.util.List<QuotesProperty> properties)
protected abstract T parseCSVLine(java.lang.String line)
public T getSingleResult() throws java.io.IOException
java.io.IOExceptionpublic java.util.List<T> getResult() throws java.io.IOException
java.io.IOException - when there's a connection problem or the request is incorrect