@Override public ValueStep build() { return new ValueStep( periodIndex, date, value); }
/** * Obtains an instance that applies at the specified date. * <p> * This factory obtains a step that causes the value to change at the specified date. * <p> * The value may be absolute or relative, as per {@link ValueAdjustment}. * * @param date the start date of the value change * @param value the adjustment to make to the value * @return the varying step */ public static ValueStep of(LocalDate date, ValueAdjustment value) { return new ValueStep(null, date, value); }
/** * Obtains an instance that applies at the specified schedule period index. * <p> * This factory is used to define the date that the step occurs in relative terms. * The date is identified by specifying the zero-based index of the schedule period boundary. * The change will occur at the start of the specified period. * Thus an index of zero is the start of the first period or initial stub. * The index must be one or greater, as a change is not permitted at the start of the first period. * <p> * For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. * A zero-based index of '2' would refer to start of the 3rd period, which would be 2013-02-01. * <p> * The value may be absolute or relative, as per {@link ValueAdjustment}. * * @param periodIndex the index of the period of the value change * @param value the adjustment to make to the value * @return the varying step */ public static ValueStep of(int periodIndex, ValueAdjustment value) { return new ValueStep(periodIndex, null, value); }