Interface StockPriceFinder

All Known Implementing Classes:
PolygonStockPriceFinder
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StockPriceFinder
Finds the price of stocks based on ticket
  • Method Summary

    Modifier and Type
    Method
    Description
    find(String ticket)
    Finds the price of one unit of a stock
  • Method Details

    • find

      Optional<StockPrice> find(String ticket)
      Finds the price of one unit of a stock
      Parameters:
      ticket - Ticket the stock is sold under
      Returns:
      price of stock if found else empty