Builder

public class Builder

Assembles a single bar field by field.

It exists for TimeSeriesResponse's parser, which reads the prices out of the API payload one key at a time and sets only the fields the cadence in hand actually returned; application code normally receives finished units from getStockUnits rather than building its own.

Constructors

Link copied to clipboard
public void StockUnit.Builder()

Functions

Link copied to clipboard
public StockUnit.Builder adjustedClose(double close)
Sets the closing price restated for splits and dividends since the bar.
Link copied to clipboard
public StockUnit build()
Assembles the values set so far into a bar.
Link copied to clipboard
public StockUnit.Builder close(double close)
Sets the price at the end of the bar's span, as quoted at the time.
Link copied to clipboard
public StockUnit.Builder dividendAmount(double dividendAmount)
Sets the dividend paid per share within the bar's span.
Link copied to clipboard
public StockUnit.Builder high(double high)
Sets the highest price reached during the bar's span.
Link copied to clipboard
public StockUnit.Builder low(double low)
Sets the lowest price reached during the bar's span.
Link copied to clipboard
public StockUnit.Builder open(double open)
Sets the price at the start of the bar's span.
Link copied to clipboard
public StockUnit.Builder splitCoefficient(double splitCoefficient)
Sets the ratio of a share split taking effect within the bar's span.
Link copied to clipboard
public StockUnit.Builder time(String dateTime)
Sets the timestamp identifying the bar.
Link copied to clipboard
public StockUnit.Builder volume(long volume)
Sets the number of shares traded during the bar's span.