Class ValueStepSequence
- java.lang.Object
-
- com.opengamma.strata.basics.value.ValueStepSequence
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ValueStepSequence extends Object implements org.joda.beans.ImmutableBean, Serializable
A sequence of steps that vary a value over time.A financial value, such as the notional or interest rate, may vary over time. This class represents a sequence of changes in the value within
ValueSchedule
.The sequence is defined by a start date, end date and frequency. The adjustment at each step is defined using
ValueAdjustment
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValueStepSequence.Meta
The meta-bean forValueStepSequence
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
ValueAdjustment
getAdjustment()
Gets the adjustment representing the change that occurs at each step.LocalDate
getFirstStepDate()
Gets the first date in the sequence.Frequency
getFrequency()
Gets the frequency of the sequence.LocalDate
getLastStepDate()
Gets the last date in the sequence.int
hashCode()
static ValueStepSequence.Meta
meta()
The meta-bean forValueStepSequence
.ValueStepSequence.Meta
metaBean()
static ValueStepSequence
of(LocalDate firstStepDate, LocalDate lastStepDate, Frequency frequency, ValueAdjustment adjustment)
Obtains an instance from the dates, frequency and change.String
toString()
-
-
-
Method Detail
-
of
public static ValueStepSequence of(LocalDate firstStepDate, LocalDate lastStepDate, Frequency frequency, ValueAdjustment adjustment)
Obtains an instance from the dates, frequency and change.- Parameters:
firstStepDate
- the first date of the sequencelastStepDate
- the last date of the sequencefrequency
- the frequency of changesadjustment
- the adjustment at each step- Returns:
- the varying step
-
meta
public static ValueStepSequence.Meta meta()
The meta-bean forValueStepSequence
.- Returns:
- the meta-bean, not null
-
metaBean
public ValueStepSequence.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getFirstStepDate
public LocalDate getFirstStepDate()
Gets the first date in the sequence.This sequence will change the value on this date, but not before. This must be one of the unadjusted dates in the schedule period schedule.
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.
- Returns:
- the value of the property, not null
-
getLastStepDate
public LocalDate getLastStepDate()
Gets the last date in the sequence.This sequence will change the value on this date, but not after. This must be one of the unadjusted dates in the schedule period schedule.
For example, consider a 5 year swap from 2012-02-01 to 2017-02-01 with 6 month frequency. The date '2015-02-01' is an unadjusted schedule period boundary, and so may be specified here.
- Returns:
- the value of the property, not null
-
getFrequency
public Frequency getFrequency()
Gets the frequency of the sequence.This sequence will change the value on each date between the start and end defined by this frequency. The frequency is interpreted relative to the frequency of a
Schedule
. It must be equal or greater than the related schedule.- Returns:
- the value of the property, not null
-
getAdjustment
public ValueAdjustment getAdjustment()
Gets the adjustment representing the change that occurs at each step.The adjustment type must not be 'Replace'.
- Returns:
- the value of the property, not null
-
-