Class BillPosition.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillPosition>
-
- com.opengamma.strata.product.bond.BillPosition.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<BillPosition>
- Enclosing class:
- BillPosition
public static final class BillPosition.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillPosition>
The bean-builder forBillPosition.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BillPositionbuild()Objectget(String propertyName)BillPosition.Builderinfo(PositionInfo info)Sets the additional position information, defaulted to an empty instance.BillPosition.BuilderlongQuantity(double longQuantity)Sets the long quantity of the security.BillPosition.Builderproduct(Bill product)Sets the bill that was traded.BillPosition.Builderset(String propertyName, Object newValue)BillPosition.Builderset(org.joda.beans.MetaProperty<?> property, Object value)BillPosition.BuildershortQuantity(double shortQuantity)Sets the short quantity of the security.StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<BillPosition>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillPosition>
-
set
public BillPosition.Builder set(String propertyName, Object newValue)
-
set
public BillPosition.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<BillPosition>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillPosition>
-
build
public BillPosition build()
-
info
public BillPosition.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 BillPosition.Builder product(Bill product)
Sets the bill 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 BillPosition.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 BillPosition.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:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillPosition>
-
-