public final class ValueStep extends Object implements org.joda.beans.ImmutableBean, Serializable
A financial value, such as the notional or interest rate, may vary over time.
This class represents a single change in the value within ValueSchedule.
The date of the change is either specified explicitly, or in relative terms via an index. The adjustment to the value can also be specified absolutely, or in relative terms.
| Modifier and Type | Class and Description |
|---|---|
static class |
ValueStep.Builder
The bean-builder for
ValueStep. |
static class |
ValueStep.Meta
The meta-bean for
ValueStep. |
| Modifier and Type | Method and Description |
|---|---|
static ValueStep.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Optional<LocalDate> |
getDate()
Gets the date of the schedule period boundary at which the change occurs.
|
OptionalInt |
getPeriodIndex()
Gets the index of the schedule period boundary at which the change occurs.
|
ValueAdjustment |
getValue()
Gets the value representing the change that occurs.
|
int |
hashCode() |
static ValueStep.Meta |
meta()
The meta-bean for
ValueStep. |
ValueStep.Meta |
metaBean() |
static ValueStep |
of(int periodIndex,
ValueAdjustment value)
Obtains an instance that applies at the specified schedule period index.
|
static ValueStep |
of(LocalDate date,
ValueAdjustment value)
Obtains an instance that applies at the specified date.
|
ValueStep.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static ValueStep of(int periodIndex, ValueAdjustment value)
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.
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.
The value may be absolute or relative, as per ValueAdjustment.
periodIndex - the index of the period of the value changevalue - the adjustment to make to the valuepublic static ValueStep of(LocalDate date, ValueAdjustment value)
This factory obtains a step that causes the value to change at the specified date.
The value may be absolute or relative, as per ValueAdjustment.
date - the start date of the value changevalue - the adjustment to make to the valuepublic static ValueStep.Meta meta()
ValueStep.public static ValueStep.Builder builder()
public ValueStep.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic OptionalInt getPeriodIndex()
This property 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.
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.
public Optional<LocalDate> getDate()
This property is used to define the date that the step occurs in absolute terms. This must be one of the unadjusted dates in the schedule period schedule. This is an unadjusted date and calculation period business day adjustments will apply.
For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. The date '2013-02-01' is an unadjusted schedule period boundary, and so may be specified here.
public ValueAdjustment getValue()
The adjustment can be an absolute value, or various kinds of relative values.
public ValueStep.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.