Class CurveNodeDateOrder

  • All Implemented Interfaces:
    Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class CurveNodeDateOrder
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    The date order rules to apply to a pair of curve nodes.

    In any curve, two nodes may not have the same date. In addition, it is typically desirable to ensure that there is a minimum gap between two nodes, such as 7 days. An instance of CurveNodeDateOrder specifies the minimum gap and what to do if the clash occurs.

    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT

        public static final CurveNodeDateOrder DEFAULT
        The default instance, that throws an exception if the node is on the same date or before another node.
    • Method Detail

      • of

        public static CurveNodeDateOrder of​(int minGapInDays,
                                            CurveNodeClashAction action)
        Obtains an instance from the minimum gap, allowing reordering flag and clash action.
        minGapInDays - the minimum gap between this node and the previous node in days, one or greater
        action - the action to perform if a clash occurs
        an instance specifying a fixed date
      • meta

        public static CurveNodeDateOrder.Meta meta()
        The meta-bean for CurveNodeDateOrder.
        the meta-bean, not null
      • getMinGapInDays

        public int getMinGapInDays()
        Gets the minimum gap between two curve nodes, measured in calendar days. A gap of one day is the smallest allowed. A clash occurs if the period between the two nodes is less than the minimum. The gap applies to the node before this one and the node after this one.
        the value of the property
      • getAction

        public CurveNodeClashAction getAction()
        Gets the action to perform if a clash occurs.
        the value of the property, not null
      • hashCode

        public int hashCode()
        hashCode in class Object