Class FixedCouponBondPosition.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondPosition>
-
- com.opengamma.strata.product.bond.FixedCouponBondPosition.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<FixedCouponBondPosition>
- Enclosing class:
- FixedCouponBondPosition
public static final class FixedCouponBondPosition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondPosition>
The bean-builder forFixedCouponBondPosition
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedCouponBondPosition
build()
Object
get(String propertyName)
FixedCouponBondPosition.Builder
info(PositionInfo info)
Sets the additional position information, defaulted to an empty instance.FixedCouponBondPosition.Builder
longQuantity(double longQuantity)
Sets the long quantity of the security.FixedCouponBondPosition.Builder
product(FixedCouponBond product)
Sets the bond that was traded.FixedCouponBondPosition.Builder
set(String propertyName, Object newValue)
FixedCouponBondPosition.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
FixedCouponBondPosition.Builder
shortQuantity(double shortQuantity)
Sets the short quantity of the security.String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondPosition>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondPosition>
-
set
public FixedCouponBondPosition.Builder set(String propertyName, Object newValue)
-
set
public FixedCouponBondPosition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<FixedCouponBondPosition>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondPosition>
-
build
public FixedCouponBondPosition build()
-
info
public FixedCouponBondPosition.Builder info(PositionInfo info)
Sets the additional position information, defaulted to an empty instance.This allows additional information to be attached to the position.
- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
product
public FixedCouponBondPosition.Builder product(FixedCouponBond product)
Sets the bond that was traded.The product captures the contracted financial details.
- Parameters:
product
- the new value, not null- Returns:
- this, for chaining, not null
-
longQuantity
public FixedCouponBondPosition.Builder longQuantity(double longQuantity)
Sets the long quantity of the security.This is the quantity of the underlying security that is held. The quantity cannot be negative, as that would imply short selling.
- Parameters:
longQuantity
- the new value- Returns:
- this, for chaining, not null
-
shortQuantity
public FixedCouponBondPosition.Builder shortQuantity(double shortQuantity)
Sets the short quantity of the security.This is the quantity of the underlying security that has been short sold. The quantity cannot be negative, as that would imply the position is long.
- Parameters:
shortQuantity
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondPosition>
-
-