Class CurveNodeDateOrder
- java.lang.Object
-
- com.opengamma.strata.market.curve.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CurveNodeDateOrder.Meta
The meta-bean forCurveNodeDateOrder
.
-
Field Summary
Fields Modifier and Type Field Description static CurveNodeDateOrder
DEFAULT
The default instance, that throws an exception if the node is on the same date or before another node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
CurveNodeClashAction
getAction()
Gets the action to perform if a clash occurs.int
getMinGapInDays()
Gets the minimum gap between two curve nodes, measured in calendar days.int
hashCode()
static CurveNodeDateOrder.Meta
meta()
The meta-bean forCurveNodeDateOrder
.CurveNodeDateOrder.Meta
metaBean()
static CurveNodeDateOrder
of(int minGapInDays, CurveNodeClashAction action)
Obtains an instance from the minimum gap, allowing reordering flag and clash action.String
toString()
-
-
-
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.- Parameters:
minGapInDays
- the minimum gap between this node and the previous node in days, one or greateraction
- the action to perform if a clash occurs- Returns:
- an instance specifying a fixed date
-
meta
public static CurveNodeDateOrder.Meta meta()
The meta-bean forCurveNodeDateOrder
.- Returns:
- the meta-bean, not null
-
metaBean
public CurveNodeDateOrder.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
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.- Returns:
- the value of the property
-
getAction
public CurveNodeClashAction getAction()
Gets the action to perform if a clash occurs.- Returns:
- the value of the property, not null
-
-