Class 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 for ValueSchedule.
    • Method Detail

      • get

        public Object get​(String propertyName)
        Specified by:
        get in interface org.joda.beans.BeanBuilder<ValueSchedule>
        Overrides:
        get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
      • set

        public ValueSchedule.Builder set​(org.joda.beans.MetaProperty<?> property,
                                         Object value)
        Specified by:
        set in interface org.joda.beans.BeanBuilder<ValueSchedule>
        Overrides:
        set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>
      • 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 the steps property 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:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ValueSchedule>