-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStockService.java
More file actions
39 lines (37 loc) · 1.48 KB
/
StockService.java
File metadata and controls
39 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package StockServices;
import java.util.Calendar;
import java.util.List;
public interface StockService {
/**
* Return the current price for a share of stock for the
* given symbol
* @param symbol the stock symbol of the company you want a
* quote for e.g. APPL for APPLE
* @return a <CODE>BigDecimal</CODE> instance
*/
StockQuote getQuote(String symbol);
/**
* Get a historical list of stock quotes for the provided
* symbol
* @param symbol the stock symbol to search for
* @param from the date of the first stock quote
* @param until the date of the last stock quote
* @return a list of StockQuote instan
ces.
* One for each day in the range specified.
*/
List<StockQuote> getQuote(String symbol, Calendar from, Calendar until);
/**
* Get a historical list of stock quotes for the provide symbol
* This method will return one StockQuote per interval specified.
*
*@param symbol the stock symbol to search for
*@param from the date of the first stock quote
*@param until the date of the last stock quote
*@param interval the number of StockQuotes to get. E.g. if Interval.DAILY was specified
*one StockQuote per day will be returned.
*
@return a list of StockQuote instances. One for each day in the range specified.
*/
List<StockQuote> getQuote(String symbol, Calendar from, Calendar until, Interval interval);
}