/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionFromSwapSchedules.java
times.addAll( scheduleFloatLeg.getPayment( ).stream( ).map( periodToTime).collect( Collectors.toList( ) ) ) ;
times.addAll ( scheduleFixedLeg.getPeriods ( ) .stream ( ) .map ( periodToTime ) .collect ( Collectors.toList ( ) ) ) ;
final Set<Double> times = new HashSet<>(); times.add(FloatingpointDate.getFloatingPointDateFromDate(referenceDate, exerciseDate.atStartOfDay())); final Function<Period, Double> periodToTime = new Function<Period, Double>() { @Override public Double apply(final Period period) { return FloatingpointDate.getFloatingPointDateFromDate(referenceDate, period.getPayment().atStartOfDay()); } }; <extra_id_0> times.addAll(scheduleFloatLeg.getPeriods().stream().map(periodToTime).collect(Collectors.toList())); return new TimeDiscretizationFromArray(times); } public LocalDate getExerciseDate() { return exerciseDate; }