Class ValueSchedule.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
-
- com.opengamma.strata.basics.value.ValueSchedule.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ValueSchedule>
- Enclosing class:
- ValueSchedule
public static final class ValueSchedule.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
The bean-builder forValueSchedule.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueSchedulebuild()Objectget(String propertyName)ValueSchedule.BuilderinitialValue(double initialValue)Sets the initial value.ValueSchedule.Builderset(String propertyName, Object newValue)ValueSchedule.Builderset(org.joda.beans.MetaProperty<?> property, Object value)ValueSchedule.Buildersteps(ValueStep... steps)Sets thestepsproperty in the builder from an array of objects.ValueSchedule.Buildersteps(List<ValueStep> steps)Sets the steps defining the change in the value.ValueSchedule.BuilderstepSequence(ValueStepSequence stepSequence)Sets the sequence of steps changing the value.StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<ValueSchedule>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
-
set
public ValueSchedule.Builder set(String propertyName, Object newValue)
-
set
public ValueSchedule.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<ValueSchedule>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
-
build
public ValueSchedule build()
-
initialValue
public ValueSchedule.Builder initialValue(double initialValue)
Sets the initial value.This is used for the lifetime of the trade unless specifically varied.
- Parameters:
initialValue- the new value- Returns:
- this, for chaining, not null
-
steps
public ValueSchedule.Builder steps(List<ValueStep> steps)
Sets the steps defining the change in the value.Each step consists of a key locating the date of the change and the adjustment that occurs.
- Parameters:
steps- the new value, not null- Returns:
- this, for chaining, not null
-
steps
public ValueSchedule.Builder steps(ValueStep... steps)
Sets thestepsproperty in the builder from an array of objects.- Parameters:
steps- the new value, not null- Returns:
- this, for chaining, not null
-
stepSequence
public ValueSchedule.Builder stepSequence(ValueStepSequence stepSequence)
Sets the sequence of steps changing the value.This allows a regular pattern of steps to be encoded. All step dates must be unique, thus the list of steps must not contain any date implied by this sequence.
- Parameters:
stepSequence- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
-
-