src/main/java/xdean/graduation/workspace/Util.java
<T extends Trader<?>> Observable<Result<T>> inday(Observable<Order> ob, T trader) {
    Repo repo = trader.getRepo();
    RepoAnalyser ra = new RepoAnalyser();
    return ob
        .doOnNext(o -> trader.trade(o))
        .doOnNext(o -> ra.accept(repo, o))
        .doOnCompleted(() -> repo.close())
        .doOnCompleted(() -> ra.accept(repo, null))
        .map(o -> new Result<T>(o, repo, ra, trader));
  }
/**
   * Calculate in-day data with the trader.
   * 
   * @param ob
   * @param trader
   * @return Observable of the result by order
   */
Calculate in-day data with the trader.

@param ob
@param trader
@return Observable of the result by order
Calculate in - day data with the trader . @param ob @param trader @return Observable of the result by order
<T extends Trader<?>> Observable<Result<T>> inday(Observable<Order> ob, T trader) {
    Repo repo = trader.getRepo();
    RepoAnalyser ra = new RepoAnalyser();
    return ob
        .doOnNext(o -> trader.trade(o))
        .doOnNext(o -> ra.accept(repo, o))
        .doOnCompleted(() -> repo.close())
        .doOnCompleted(() -> ra.accept(repo, null))
        .map(o -> new Result<T>(o, repo, ra, trader));
  }
< T extends Trader < ? > > Observable < Result < T > > inday ( Observable < Order > ob , T trader ) { Repo repo = trader . getRepo ( ) ; RepoAnalyser ra = new RepoAnalyser ( ) ; return ob . doOnNext ( o -> trader . trade ( o ) ) . doOnNext ( o -> ra . accept ( repo , o ) ) . doOnCompleted ( ( ) -> repo . close ( ) ) . doOnCompleted ( ( ) -> ra . accept ( repo , null ) ) . map ( o -> new Result < T > ( o , repo , ra , trader ) ) ; }
Calculate in-day data with the trader.
Calculate in - day data with the trader .